Example #1
0
        public OAuthClient FromArena(Client dbClient)
        {
            OAuthClient client = new OAuthClient();

            client.ClientID    = dbClient.ClientId;
            client.APIKey      = dbClient.ApiKey.ToString();
            client.Active      = dbClient.Active;
            client.CallbackURL = dbClient.Callback;
            client.Name        = dbClient.Name;
            client.Scopes      = new List <OAuthScope>();
            foreach (Scope dbScope in dbClient.Scopes)
            {
                OAuthScope scope = new OAuthScope();
                scope.Active      = dbScope.Active;
                scope.Description = dbScope.Description;
                scope.Identifier  = dbScope.Identifier;
                scope.ScopeID     = dbScope.ScopeId;
                client.Scopes.Add(scope);
            }
            return(client);
        }
 public OAuthClient FromArena(Client dbClient)
 {
     OAuthClient client = new OAuthClient();
     client.ClientID = dbClient.ClientId;
     client.APIKey = dbClient.ApiKey.ToString();
     client.Active = dbClient.Active;
     client.CallbackURL = dbClient.Callback;
     client.Name = dbClient.Name;
     client.Scopes = new List<OAuthScope>();
     foreach(Scope dbScope in dbClient.Scopes)
     {
         OAuthScope scope = new OAuthScope();
         scope.Active = dbScope.Active;
         scope.Description = dbScope.Description;
         scope.Identifier = dbScope.Identifier;
         scope.ScopeID = dbScope.ScopeId;
         client.Scopes.Add(scope);
     }
     return client;
 }