예제 #1
0
 public TokenContext(string tokenValue, TrelloAuthorization auth)
     : base(auth)
 {
     Data.TokenValue   = tokenValue;
     Data.Permissions  = new List <IJsonTokenPermission>();
     MemberPermissions = new TokenPermissionContext(Auth);
     Data.Permissions.Add(MemberPermissions.Data);
     BoardPermissions = new TokenPermissionContext(Auth);
     Data.Permissions.Add(BoardPermissions.Data);
     OrganizationPermissions = new TokenPermissionContext(Auth);
     Data.Permissions.Add(OrganizationPermissions.Data);
 }
 public TokenContext(string id, TrelloAuthorization auth)
     : base(auth)
 {
     Data.Id           = id;
     Data.Permissions  = new List <IJsonTokenPermission>();
     MemberPermissions = new TokenPermissionContext(Auth);
     MemberPermissions.SynchronizeRequested += () => Synchronize();
     Data.Permissions.Add(MemberPermissions.Data);
     BoardPermissions = new TokenPermissionContext(Auth);
     BoardPermissions.SynchronizeRequested += () => Synchronize();
     Data.Permissions.Add(BoardPermissions.Data);
     OrganizationPermissions = new TokenPermissionContext(Auth);
     OrganizationPermissions.SynchronizeRequested += () => Synchronize();
     Data.Permissions.Add(OrganizationPermissions.Data);
 }