/// <summary> /// Initializes a new instance of the <see cref="T:MyGame.FreezingBulletSystem"/> class. /// </summary> /// <param name="world">The World the System belongs to .</param> public FreezingBulletSystem(World world) : base(world) { /// <summary> /// The Freezing Bullet System's Component Masks are: /// Include - CProjectile, CPosition, CVelocity, CFreezingBullet /// Exclude - null /// </summary> Include.Add(typeof(CFreezingBullet)); }
/// <summary> /// Initializes a new instance of the <see cref="T:MyGame.PlayerAISystem"/> class. /// </summary> /// <param name="world">The World the System belongs to.</param> public PlayerAISystem(World world) : base(world) { /// <summary> /// The Player AI System's Component Masks are: /// Include - CAI, CPlayerTeam /// Exclude - CENemyTeam /// </summary> /// <param name="entID">Ent identifier.</param> Include.Remove(typeof(CEnemyTeam)); Include.Add(typeof(CPlayerTeam)); _enemies = new EntityHolderSystem(new List <Type> { typeof(CEnemyTeam), typeof(CHealth) }, new List <Type> { }, world); World.AddSystem(_enemies); }
public void Append(FilterSet filterSet) { foreach (string include in filterSet.GetIncludePatterns()) { Pattern pattern = new Pattern { PatternName = include }; Include.Add(pattern); } foreach (string exclude in filterSet.GetExcludePatterns()) { Pattern pattern = new Pattern { PatternName = exclude }; Exclude.Add(pattern); } }
public override void Init() { Configuration.AddInputStream(HbmSerializer.Default.Serialize(Assembly.Load("Common.Models"))); Mapper.Class <ArchiveOffer>(m => { m.Schema("Farm"); m.Table("CoreArchive"); m.ManyToOne(i => i.PriceList, x => x.Column("PriceCode")); }); Mapper.Class <Document>(m => { m.Schema("Documents"); m.Table("DocumentHeaders"); m.OneToOne(i => i.Invoice, _ => { }); m.ManyToOne(i => i.Supplier, x => x.Column("FirmCode")); }); Mapper.Class <Invoice>(m => { m.Schema("Documents"); m.Table("InvoiceHeaders"); m.OneToOne(i => i.Document, _ => { }); m.Property(i => i.RecipientAddress, i => i.Column("ConsigneeInfo")); }); Mapper.Class <DocumentLine>(m => { m.Schema("Documents"); m.Table("DocumentBodies"); m.ManyToOne(i => i.ProductEntity, x => x.Column("ProductId")); m.Property(i => i.ProducerCostWithoutNDS, x => x.Column("ProducerCost")); }); Mapper.Class <DocumentSendLog>(m => m.Schema("logs")); Mapper.Class <DocumentLog>(m => { m.Schema("logs"); m.Table("document_logs"); m.Id(x => x.Id, p => p.Column("RowId")); m.ManyToOne(l => l.Supplier, i => i.Column("FirmCode")); }); Mapper.Class <FtpConfig>(m => m.Schema("Customers")); Include.Add(typeof(ArchiveOffer)); base.Init(); }
public override async Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state) { ChatFilter filter = null; if (parameter is int id) { var response = await ProtoService.SendAsync(new GetChatFilter(id)); if (response is ChatFilter result) { Id = id; Filter = result; filter = result; } else { // TODO } } else { Id = null; Filter = null; filter = new ChatFilter(); filter.PinnedChatIds = new List <long>(); filter.IncludedChatIds = new List <long>(); filter.ExcludedChatIds = new List <long>(); } if (filter == null) { return; } if (state != null && state.TryGet("included_chat_id", out long includedChatId)) { filter.IncludedChatIds.Add(includedChatId); } _pinnedChatIds = filter.PinnedChatIds ?? new List <long>(); _iconPicked = !string.IsNullOrEmpty(filter.IconName); Title = filter.Title; Icon = Icons.ParseFilter(filter); Include.Clear(); Exclude.Clear(); if (filter.IncludeContacts) { Include.Add(new FilterFlag { Flag = ChatListFilterFlags.IncludeContacts }); } if (filter.IncludeNonContacts) { Include.Add(new FilterFlag { Flag = ChatListFilterFlags.IncludeNonContacts }); } if (filter.IncludeGroups) { Include.Add(new FilterFlag { Flag = ChatListFilterFlags.IncludeGroups }); } if (filter.IncludeChannels) { Include.Add(new FilterFlag { Flag = ChatListFilterFlags.IncludeChannels }); } if (filter.IncludeBots) { Include.Add(new FilterFlag { Flag = ChatListFilterFlags.IncludeBots }); } if (filter.ExcludeMuted) { Exclude.Add(new FilterFlag { Flag = ChatListFilterFlags.ExcludeMuted }); } if (filter.ExcludeRead) { Exclude.Add(new FilterFlag { Flag = ChatListFilterFlags.ExcludeRead }); } if (filter.ExcludeArchived) { Exclude.Add(new FilterFlag { Flag = ChatListFilterFlags.ExcludeArchived }); } foreach (var chatId in filter.PinnedChatIds.Union(filter.IncludedChatIds)) { var chat = CacheService.GetChat(chatId); if (chat == null) { continue; } Include.Add(new FilterChat { Chat = chat }); } foreach (var chatId in filter.ExcludedChatIds) { var chat = CacheService.GetChat(chatId); if (chat == null) { continue; } Exclude.Add(new FilterChat { Chat = chat }); } UpdateIcon(); }
protected virtual void AddInclude(Expression <Func <T, object> > expressionInclude) { Include.Add(expressionInclude); }
/// <summary> /// Add a parameter with a given name and value. /// </summary> /// <param name="name">The name of the parameter</param> /// <param name="value">The value of the parameter as a FHIR datatype or Resource</param> /// <returns>this (Parameters), so you can chain AddParameter calls</returns> public SearchParams Add(string name, string value) { if (name == null) { throw Error.ArgumentNull("name"); } if (value == null) { throw Error.ArgumentNull("value"); } if (String.IsNullOrEmpty(value)) { throw Error.Argument("value", "value cannot be empty"); } if (name == SEARCH_PARAM_QUERY) { Query = value; } else if (name == SEARCH_PARAM_TEXT) { Text = value; } else if (name == SEARCH_PARAM_CONTENT) { Content = value; } else if (name == SEARCH_PARAM_COUNT) { Count = Int32.Parse(value); } else if (name == SEARCH_PARAM_INCLUDE) { Include.Add(value); } else if (name == SEARCH_PARAM_REVINCLUDE) { RevInclude.Add(value); } else if (name.StartsWith(SEARCH_PARAM_SORT + SEARCH_MODIFIERSEPARATOR)) { var order = name.Substring(SEARCH_PARAM_SORT.Length + 1).ToLower(); if (order.StartsWith("asc")) { Sort.Add(Tuple.Create(value, SortOrder.Ascending)); } else if (order.StartsWith("desc")) { Sort.Add(Tuple.Create(value, SortOrder.Descending)); } else { throw Error.Format("Cannot parse sort order '{0}'", null, order); } } else if (name == SEARCH_PARAM_SUMMARY) { SummaryType st = SummaryType.False; if (Enum.TryParse <SummaryType>(value, ignoreCase: true, result: out st)) { Summary = st; } else { throw Error.Format("Cannot parse summary value '{0}'", null, value); } } else if (name == SEARCH_PARAM_FILTER) { Filter = value; } else if (name == SEARCH_PARAM_CONTAINED) { if (SEARCH_CONTAINED_TRUE.Equals(value)) { Contained = ContainedSearch.True; } else if (SEARCH_CONTAINED_FALSE.Equals(value)) { Contained = ContainedSearch.False; } else if (SEARCH_CONTAINED_BOTH.Equals(value)) { Contained = ContainedSearch.Both; } else { throw Error.Format("Cannot parse contained value '{0}'", null, value); } } else if (name == SEARCH_PARAM_CONTAINEDTYPE) { if (SEARCH_CONTAINED_TYPE_CONTAINED.Equals(value)) { ContainedType = ContainedResult.Contained; } else if (SEARCH_CONTAINED_TYPE_CONTAINER.Equals(value)) { ContainedType = ContainedResult.Container; } else { throw Error.Format("Cannot parse containedType value '{0}'", null, value); } } else if (name == SEARCH_PARAM_ELEMENTS) { Elements.AddRange(value.Split(',')); } else { Parameters.Add(Tuple.Create(name, value)); } return(this); }
protected void AddInclude(Expression <Func <T, object> > includeExpression) { Include.Add(includeExpression); }
/// <summary> /// Adds a filter to the list of inclusions /// </summary> /// <param name="file">The filter to add</param> /// <returns></returns> public CoverletSettings WithInclusion(string file) { Include.Add(file); return(this); }