public HomeGroupsViewModel(GroupState?groupState, GroupOrderByType?orderBy) { GroupStateFilter = groupState.HasValue ? (byte)groupState : -1; OrderByFilter = (byte)(orderBy.HasValue ? orderBy.Value : GroupOrderByType.ByTitle); CachLabel = GroupStateFilter + "&" + OrderByFilter; CachDropPeriod = TimeSpan.FromHours(12); }
/// <summary> /// Initializes a new instance of the <see cref="ClanWarLeagueGroup" /> class. /// </summary> /// <param name="tag">tag.</param> /// <param name="state">state.</param> /// <param name="season">season.</param> /// <param name="clans">clans.</param> /// <param name="rounds">rounds.</param> public ClanWarLeagueGroup(string tag = default(string), GroupState?state = default(GroupState?), DateTime season = default(DateTime), List <ClanWarLeagueClan> clans = default(List <ClanWarLeagueClan>), List <ClanWarLeagueRound> rounds = default(List <ClanWarLeagueRound>)) { Tag = tag; State = state; Season = season; Clans = clans; Rounds = rounds; }
private CachedClanWarLeagueGroup(string tag, ApiResponse <ClanWarLeagueGroup> apiResponse, TimeSpan localExpiration) : this(tag) { UpdateFrom(apiResponse, localExpiration); Season = apiResponse.Data?.Season; State = apiResponse.Data?.State; }
internal void UpdateFrom(CachedClanWarLeagueGroup fetched) { if (ServerExpiration > fetched.ServerExpiration) { return; } base.UpdateFrom(fetched); if (fetched.StatusCode == System.Net.HttpStatusCode.OK) { Season = fetched.Season; State = fetched.State; } }
/// <summary> /// Get an existing Group resource's state with the given name, ID, and optional extra /// properties used to qualify the lookup. /// </summary> /// /// <param name="name">The unique name of the resulting resource.</param> /// <param name="id">The unique provider ID of the resource to lookup.</param> /// <param name="state">Any extra arguments used during the lookup.</param> /// <param name="options">A bag of options that control this resource's behavior</param> public static Group Get(string name, Input <string> id, GroupState?state = null, CustomResourceOptions?options = null) { return(new Group(name, id, state, options)); }
private Group(string name, Input <string> id, GroupState?state = null, CustomResourceOptions?options = null) : base("azure:containerservice/group:Group", name, state, MakeResourceOptions(options, id)) { }
private Group(string name, Input <string> id, GroupState?state = null, CustomResourceOptions?options = null) : base("aws:iam/group:Group", name, state, MakeResourceOptions(options, id)) { }
private Group(string name, Input <string> id, GroupState?state = null, CustomResourceOptions?options = null) : base("azuredevops:Identities/group:Group", name, state, MakeResourceOptions(options, id)) { }
private Group(string name, Input <string> id, GroupState?state = null, CustomResourceOptions?options = null) : base("alicloud:securitycenter/group:Group", name, state, MakeResourceOptions(options, id)) { }