static public KeyValuePair <IBookIndex, IBookTarget> ComposeTarget(IBookParty party, SymbolName articleName, IBookIndex element, ITargetValues values, IProcessConfig config) { IBookTarget target = BuildTargetFromElement(element, values, config); return(new KeyValuePair <IBookIndex, IBookTarget>(element, target)); }
/// <summary> /// Initializes a new instance of the Character class with the specified SymbolName. /// </summary> Character(SymbolName name) : this() { //DaSt: uint wird nicht akzeptiert, muss auf int casten //SetValue("SymbolName", (int)(uint)name); this.symbolName.Value = (int)name; }
/// <summary> /// Initializes a new instance of the Character class with the specified SymbolName. /// </summary> Character(SymbolName name) : this() { //DaSt: uint wird nicht akzeptiert, muss auf int casten //SetValue("SymbolName", (int)(uint)name); this.symbolName.Value = (int)name; }
protected GeneralPayrollArticle(uint articleCode, string articleName, uint conceptCode, string conceptName, ProcessCategory category, SymbolName[] pendingNames, SymbolName[] summaryNames, bool taxingIncome, bool healthIncome, bool socialIncome, bool grossSummary, bool nettoSummary, bool nettoDeducts) : base(articleCode, articleName) { __conceptSymbol = new SymbolName(conceptCode, conceptName); __category = category; __pendingArticleNames = (SymbolName[])pendingNames.Clone(); __summaryArticleNames = (SymbolName[])summaryNames.Clone(); __healthIncome = healthIncome; __socialIncome = socialIncome; __taxingIncome = taxingIncome; __summaryGross = grossSummary; __summaryNetto = nettoSummary; __deductsNetto = nettoDeducts; }
/// <summary> /// Initializes a new instance of the Character class with the specified SymbolName. /// </summary> Character(SymbolName name) : this() { // uint does not work, need cast to int. //SetValue("SymbolName", (int)(uint)name); _symbolName.Value = (int)name; }
public async void TestSymbolDeduplication(string feedName) { var symbolName = new SymbolName("imageName", "symbolHash"); var feed = Storage.GetFeed(feedName); await TestDeduplication(packageName => feed.GetSymbol(packageName, symbolName)); }
/// <summary> /// Initializes a new instance of the Character class with the specified SymbolName. /// </summary> Character(SymbolName name) : this() { // uint does not work, need cast to int. //SetValue("SymbolName", (int)(uint)name); _symbolName.Value = (int)name; }
public void Should_Compare_Different_Symbols_AsEqual() { SymbolName testSymbolOne = new SymbolName(testSymbolCode1001, "Begining Symbol"); SymbolName testSymbolTwo = new SymbolName(testSymbolCode1001, "Terminal Symbol"); Assert.AreEqual(testSymbolOne, testSymbolTwo); }
public void Should_Return_ContractTaskTermArticle_As_ClassName() { SymbolName testSpecName = ArticleSymbolName.REF_INCOME_GROSS; string testClassName = PayrollArticleFactory.ClassNameFor(testSpecName.Name); Assert.AreEqual(testClassName, "IncomeGrossArticle"); }
public void Should_Return_ContractTaskTermConcept_As_ClassName() { SymbolName testSpecName = ConceptSymbolName.REF_INCOME_GROSS; string testClassName = PayrollConceptFactory.ClassNameFor(testSpecName.Name); Assert.AreEqual(testClassName, "IncomeGrossConcept"); }
public T EmptyInstanceForCode(Assembly configAssembly, uint configCode) { SymbolName configSymbol = GetSymbol(configCode); T emptyInstance = InstanceFor(configAssembly, configSymbol); return(emptyInstance); }
public static IPayrollConcept CreateConcept(SymbolName concept, bool nodeContract, bool nodePosition, bool qualContract, bool qualPosition, string targetValues, string resultValues, GeneralModule.EvaluateDelegate evaluate) { IPayrollConcept conceptInstance = new GeneralPayrollConcept(concept, nodeContract, nodePosition, qualContract, qualPosition, targetValues, resultValues, evaluate); return(conceptInstance); }
/// <summary> /// Adds one or more Character objects. /// </summary> public Character AddCharacter(SymbolName symbolType, int count) { Character character = new Character(); Add(character); character.SymbolName = symbolType; character.Count = count; return(character); }
public void EnemyClick() { if (value == SymbolName.N) { value = GameController.instance.enemySymbol; UpdateGraphics(); GameController.instance.CalculateRound(); } }
public IPayrollConcept ConfigureConcept(SymbolName concept, bool nodeContract, bool nodePosition, bool qualContract, bool qualPosition, string targetValues, string resultValues, GeneralModule.EvaluateDelegate evaluate) { return(ConceptsCollection.ConfigureConcept( concept, nodeContract, nodePosition, qualContract, qualPosition, targetValues, resultValues, evaluate)); }
public async void TestSymbol(string feedName) { var packageName = new PackageName("packageId", "1.0"); var symbolName = new SymbolName("imageName", "imageHash"); var feed = Storage.GetFeed(feedName); var symbol = feed.GetSymbol(packageName, symbolName); await TestItemRoundtrip(symbol); }
public void Should_Compare_Different_Symbols_AsGreater() { SymbolName testSymbolOne = new SymbolName(testSymbolCode1001, "Begining Symbol"); SymbolName testSymbolTwo = new SymbolName(testSymbolCode5001, "Terminal Symbol"); Assert.AreNotEqual(testSymbolTwo, testSymbolOne); Assert.Greater(testSymbolTwo, testSymbolOne); }
public void UserClick() { if (value == SymbolName.N) { value = GameController.instance.playerSymbol; UpdateGraphics(); GameController.instance.CalculateRound(); GameController.instance.EnemySelectRandom(); } }
public void Combine_should_qualify_member_with_type(SymbolType symbolType) { var actual = MetadataName.Combine( TypeName.Parse("String"), SymbolName.Parse("Length").ConvertTo(symbolType) ); Assert.Equal(symbolType, actual.SymbolType); Assert.Equal("String.Length", actual.FullName); }
public IPayrollArticle ConfigureArticle(SymbolName article, SymbolName concept, ProcessCategory category, SymbolName[] pendingNames, SymbolName[] summaryNames, bool taxingIncome, bool healthIncome, bool socialIncome, bool grossSummary, bool nettoSummary, bool nettoDeducts) { return(ArticlesCollection.ConfigureArticle( article, concept, category, pendingNames, summaryNames, taxingIncome, healthIncome, socialIncome, grossSummary, nettoSummary, nettoDeducts)); }
public static IPayrollArticle CreateArticle(SymbolName article, SymbolName concept, ProcessCategory category, SymbolName[] pendingNames, SymbolName[] summaryNames, bool taxingIncome, bool healthIncome, bool socialIncome, bool grossSummary, bool nettoSummary, bool nettoDeducts) { return(new GeneralPayrollArticle(article, concept, category, pendingNames, summaryNames, taxingIncome, healthIncome, socialIncome, grossSummary, nettoSummary, nettoDeducts)); }
public IPayrollArticle ConfigureArticle(SymbolName article, SymbolName concept, ProcessCategory category, SymbolName[] pendingNames, SymbolName[] summaryNames, bool taxingIncome, bool healthIncome, bool socialIncome, bool grossSummary, bool nettoSummary, bool nettoDeducts) { IPayrollArticle articleInstance = GeneralPayrollArticle.CreateArticle( article, concept, category, pendingNames, summaryNames, taxingIncome, healthIncome, socialIncome, grossSummary, nettoSummary, nettoDeducts); return(ConfigureModel(articleInstance, article.Code)); }
public async void TestSymbolWithoutPackageName(string feedName) { var packageName = new PackageName("packageId", "1.0"); var symbolName = new SymbolName("imageName", "imageHash"); var feed = Storage.GetFeed(feedName); var symbol = feed.GetSymbol(packageName, symbolName); var symbolWithoutPackageName = feed.GetSymbol(null, symbolName); await TestPackageRelatedItemRoundtrip(packageName, symbol, symbolWithoutPackageName, "symbolContent"); }
private static SymbolName[] ToSymbolTable(this ICollection <KeyValuePair <SymbolId, string> > @this) { var symbols = new SymbolName[@this.Count]; foreach (var kv in @this) { var idx = (int)kv.Key; symbols[idx] = new SymbolName(idx, kv.Value); } return(symbols); }
public void Should_Return_UnknownArticle_From_Models() { SymbolName testSpecName = ArticleSymbolName.REF_UNKNOWN; IPayrollArticle testArticle = testConfig.FindArticle(testSpecName.Code); Type testTypeOfArticle = testArticle.GetType(); Assert.AreSame(typeof(UnknownArticle), testTypeOfArticle); Assert.AreEqual(testArticle.ArticleCode(), testSpecName.Code); }
public void Should_Return_UnknownConcept_From_Models() { SymbolName testSpecName = ConceptSymbolName.REF_UNKNOWN; IPayrollConcept testConcept = testConfig.FindConcept(testSpecName.Code); Type testTypeOfConcept = testConcept.GetType(); Assert.AreSame(typeof(UnknownConcept), testTypeOfConcept); Assert.AreEqual(testConcept.ConceptCode(), testSpecName.Code); }
public void Should_Return_UnknownConcept_As_TypeOf() { SymbolName testSpecName = ConceptSymbolName.REF_UNKNOWN; Assembly configAssembly = typeof(ProcessConfigSetCzModule).Assembly; IPayrollConcept testConcept = PayrollConceptFactory.ConceptFor(configAssembly, testSpecName.Name); Type testTypeOfConcept = testConcept.GetType(); Assert.AreSame(typeof(UnknownConcept), testTypeOfConcept); }
public void Should_Return_UnknownArticle_As_TypeOf() { SymbolName testSpecName = ConfigSetCzArticleName.REF_UNKNOWN; Assembly configAssembly = typeof(ProcessConfigSetCzModule).Assembly; IPayrollArticle testArticle = PayrollArticleFactory.ArticleFor(configAssembly, testSpecName.Name); Type testTypeOfArticle = testArticle.GetType(); Assert.AreSame(typeof(UnknownArticle), testTypeOfArticle); }
private static IPayrollArticle[] CollectRelatedArticles(IDictionary <uint, IPayrollArticle[]> initialDict, uint articleCode, IPayrollArticle[] pendingArticles, IDictionary <uint, IPayrollArticle[]> pendingDict, IProcessConfigLogger logger) { var callingArticles = new SymbolName[0]; var relatedList = pendingArticles.Aggregate(new IPayrollArticle[0], (agr, article) => agr.Concat(ResolveArticleDependency(initialDict, article, callingArticles, pendingDict, logger)).ToArray()); var articleList = relatedList.Distinct().OrderBy(x => x.ArticleSymbol()).ToArray(); return(articleList); }
private bool FindMatch(out SymbolName winner, ItemBehaviour[,] items) { int rayCount = 2; for (int i = 0; i < items.GetLength(0); i++) { for (int j = 0; j < items.GetLength(1); j++) { //horizontal if ((items.GetLength(1) - j) > rayCount && items[j, i].value != SymbolName.N) { if (items[j, i].value == items[j + 1, i].value && items[j, i].value == items[j + 2, i].value) { winner = items [j, i].value; return(true); } } //vertical if ((items.GetLength(0) - i) > rayCount && items[j, i].value != SymbolName.N) { if (items[j, i].value == items[j, i + 1].value && items[j, i].value == items[j, i + 2].value) { winner = items [j, i].value; return(true); } } //diagonal direito if (((items.GetLength(1) - j) > rayCount && (items.GetLength(0) - i) > rayCount) && items[j, i].value != SymbolName.N) { if (items[j, i].value == items[j + 1, i + 1].value && items[j, i].value == items[j + 2, i + 2].value) { winner = items [j, i].value; return(true); } } bool isTopRight = j == items.GetLength(0) - 1 && i == 0; //diagonal esquerdo if (((j - rayCount) > rayCount && (i - rayCount) > rayCount || isTopRight) && items[j, i].value != SymbolName.N) { if (items[j, i].value == items[j - 1, i + 1].value && items[j, i].value == items[j - 2, i + 2].value) { winner = items [j, i].value; return(true); } } } } winner = SymbolName.N; return(false); }
public XElement ToKml() { var placeMark = new XElement("Placemark"); placeMark.Add(new XElement("name", Name)); placeMark.Add(new XElement("description", Description)); if (!string.IsNullOrEmpty(SymbolName)) { var url = string.Format("#{0}", SymbolName.ToLowerInvariant()); placeMark.Add(new XElement("styleUrl", url)); } placeMark.Add(Geometry.ToKml()); return(placeMark); }
internal NamedVariable CreateVariable(Sort sort, string name = null) { Contract.Requires(sort != null); var symbolName = new SymbolName(name, this.lastVariableNumber++); this.lastVariableNumber++; var variable = ExpressionFactory.NamedVariable(sort, symbolName); this.customVariables.Add(variable); return(variable); }
/// <summary> /// Adds one or more Character objects. /// </summary> public Character AddCharacter(SymbolName symbolType, int count) { Character character = new Character(); this.Add(character); character.SymbolName = symbolType; character.Count = count; return character; }
/// <summary> /// Adds one or more Symbol objects. /// </summary> public Character AddCharacter(SymbolName symbolType, int count) { return this.Elements.AddCharacter(symbolType, count); }
/// <summary> /// Adds a Character object. /// </summary> public Character AddCharacter(SymbolName symbolType) { return AddCharacter(symbolType, 1); }
/// <summary> /// Adds a Symbol object. /// </summary> public Character AddCharacter(SymbolName symbolType) { return this.Elements.AddCharacter(symbolType); }