コード例 #1
0
 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);
 }
コード例 #2
0
 /// <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;
 }
コード例 #3
0
        private CachedClanWarLeagueGroup(string tag, ApiResponse <ClanWarLeagueGroup> apiResponse, TimeSpan localExpiration) : this(tag)
        {
            UpdateFrom(apiResponse, localExpiration);

            Season = apiResponse.Data?.Season;

            State = apiResponse.Data?.State;
        }
コード例 #4
0
        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;
            }
        }
コード例 #5
0
 /// <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));
 }
コード例 #6
0
 private Group(string name, Input <string> id, GroupState?state = null, CustomResourceOptions?options = null)
     : base("azure:containerservice/group:Group", name, state, MakeResourceOptions(options, id))
 {
 }
コード例 #7
0
ファイル: Group.cs プロジェクト: JakeGinnivan/pulumi-aws
 private Group(string name, Input <string> id, GroupState?state = null, CustomResourceOptions?options = null)
     : base("aws:iam/group:Group", name, state, MakeResourceOptions(options, id))
 {
 }
コード例 #8
0
 private Group(string name, Input <string> id, GroupState?state = null, CustomResourceOptions?options = null)
     : base("azuredevops:Identities/group:Group", name, state, MakeResourceOptions(options, id))
 {
 }
コード例 #9
0
 private Group(string name, Input <string> id, GroupState?state = null, CustomResourceOptions?options = null)
     : base("alicloud:securitycenter/group:Group", name, state, MakeResourceOptions(options, id))
 {
 }