Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AutoTradingBot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SoftwareDesignGruppe25
AutoTradingBot
Commits
7cb32587
Commit
7cb32587
authored
10 months ago
by
AFONY10
Browse files
Options
Downloads
Patches
Plain Diff
Clean up
parent
fa435b0e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ATB-ChainPattern/ConcreteHandlers/DistributeHandler.cs
+0
-70
0 additions, 70 deletions
ATB-ChainPattern/ConcreteHandlers/DistributeHandler.cs
with
0 additions
and
70 deletions
ATB-ChainPattern/ConcreteHandlers/DistributeHandler.cs
+
0
−
70
View file @
7cb32587
...
@@ -74,73 +74,3 @@ namespace ATB_ChainPattern
...
@@ -74,73 +74,3 @@ namespace ATB_ChainPattern
}
}
}
}
}
}
//using System;
//using System.Collections.Generic;
//using ATB_ChainPattern.DummyData;
//using ATB_ChainPattern.BaseHandlers;
//using ATB_ChainPattern.ConcreteHandlers;
//namespace ATB_ChainPattern
//{
// public class DistributeHandler : ProductHandlerBase
// {
// public override void AnalyzeProduct(ProductData product)
// {
// // Validate the product name and type
// if (!ProductData.ProductTypeMap.ContainsKey(product.ProductName))
// {
// Console.WriteLine("Invalid product name. Request closed.");
// return;
// }
// List<ProductType> productTypes = ProductData.ProductTypeMap[product.ProductName];
// if (!productTypes.Contains(product.ProductType))
// {
// Console.WriteLine("Invalid product type. Request closed.");
// return;
// }
// // Determine the appropriate handler based on the product type
// IProductHandler handler = GetSuccessor(product.ProductType);
// // Set up the chain
// SetSuccessor(handler);
// // Pass the product name to the chain root for analysis
// successor.AnalyzeProduct(product);
// }
// private IProductHandler GetSuccessor(ProductType productType)
// {
// // Determine the appropriate handler based on the product type
// switch (productType)
// {
// case ProductType.Stock:
// return new StockHandlerBase(null); // No further successor for now
// case ProductType.Currency:
// return new CurrencyHandlerBase(null); // No further successor for now
// case ProductType.Commodity:
// return new CommodityHandlerBase(null); // No further successor for now
// // Add cases for other product types as needed
// default:
// throw new ArgumentException("Invalid product type.");
// }
// }
// protected override bool CanAnalyzeProduct(ProductData productName)
// {
// // Dummy implementation, always return true since DistributeHandler doesn't perform actual analysis
// return true;
// }
// protected override void Analyze(ProductData productName)
// {
// // Dummy implementation, no actual analysis needed in DistributeHandler
// // You can optionally throw an exception here to indicate that this method should not be called
// // throw new InvalidOperationException("Analyze method should not be called in DistributeHandler.");
// }
// }
//}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment