/// <summary>
 /// Adds the specified <paramref name="scope"/> to the collection.
 /// </summary>
 /// <param name="scope">The scope to be added.</param>
 public void Add(PinterestScope scope)
 {
     if (scope == null)
     {
         throw new ArgumentNullException(nameof(scope));
     }
     _list.Add(scope);
 }
Esempio n. 2
0
        /// <summary>
        /// Registers a scope in the internal dictionary.
        /// </summary>
        /// <param name="name">The name of the scope.</param>
        internal static PinterestScope RegisterScope(string name)
        {
            if (String.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentNullException(nameof(name));
            }
            PinterestScope scope = new PinterestScope(name);

            Scopes.Add(scope.Name, scope);
            return(scope);
        }
 /// <summary>
 /// Registers a scope in the internal dictionary.
 /// </summary>
 /// <param name="name">The name of the scope.</param>
 internal static PinterestScope RegisterScope(string name) {
     PinterestScope scope = new PinterestScope(name);
     Scopes.Add(scope.Name, scope);
     return scope;
 }