/// <summary>
 /// Gets a single folder, based on its Id.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Folders or Folders.Read.
 ///
 /// Required permissions: (Units.View - Gets any folder) and (SubFolders.View -
 /// Gets folder only if user has SubFolders.View permission on it).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='expand'>
 /// Indicates the related entities to be represented inline. The maximum depth
 /// is 2.
 /// </param>
 /// <param name='select'>
 /// Limits the properties returned in the result.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FolderDto> GetByIdAsync(this IFolders operations, long key, string expand = default(string), string select = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetByIdWithHttpMessagesAsync(key, expand, select, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #2
0
 internal MailChimp(
     IAutomations automations, 
     ICampaigns campaigns, 
     IConversations conversations, 
     IEcomm ecomm, 
     IFolders folders, 
     IGallery gallery, 
     IGoal goal, 
     IHelper helper, 
     ILists lists, 
     IReports reports, 
     ITemplates templates, 
     IUsers users, 
     IVip vip)
 {
     Automations = automations;
     Campaigns = campaigns;
     Conversations = conversations;
     Ecomm = ecomm;
     Folders = folders;
     Gallery = gallery;
     Goal = goal;
     Helper = helper;
     Lists = lists;
     Reports = reports;
     Templates = templates;
     Users = users;
     Vip = vip;
 }
 /// <summary>
 /// Edits a folder.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Folders or Folders.Write.
 ///
 /// Required permissions: (Units.Edit - Edits any folder) and (SubFolders.Edit
 /// - Edits folder only if user has SubFolders.Edit permission on it).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FolderDto> PutByIdAsync(this IFolders operations, long key, FolderDto body = default(FolderDto), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PutByIdWithHttpMessagesAsync(key, body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets folders.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Folders or Folders.Read.
 ///
 /// Required permissions: (Units.View - Gets all folders) and (SubFolders.View
 /// - Gets only folders where user has SubFolders.View permission).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='expand'>
 /// Indicates the related entities to be represented inline. The maximum depth
 /// is 2.
 /// </param>
 /// <param name='filter'>
 /// Restricts the set of items returned. The maximum number of expressions is
 /// 100.
 /// </param>
 /// <param name='select'>
 /// Limits the properties returned in the result.
 /// </param>
 /// <param name='orderby'>
 /// Specifies the order in which items are returned. The maximum number of
 /// expressions is 5.
 /// </param>
 /// <param name='top'>
 /// Limits the number of items returned from a collection. The maximum value is
 /// 1000.
 /// </param>
 /// <param name='skip'>
 /// Excludes the specified number of items of the queried collection from the
 /// result.
 /// </param>
 /// <param name='count'>
 /// Indicates whether the total count of items within a collection are returned
 /// in the result.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ODataValueOfIEnumerableOfFolderDto> GetAsync(this IFolders operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(expand, filter, select, orderby, top, skip, count, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #5
0
        public SqlitePersisterFolderUpdates(IFiles files, IFolders folders, ILogger logger)
        {
            //  the files interface.
            _folders = folders ?? throw new ArgumentNullException(nameof(folders));

            //  the files interface.
            _files = files ?? throw new ArgumentNullException(nameof(files));

            // save the logger
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));
        }
Beispiel #6
0
        public CategoriesForm(ICategories categories, IConfig config, IFolders folders)
        {
            // the categories
            _categories = categories;

            // the config
            _config = config;

            // the outlook root project.
            _folders = folders;

            InitializeComponent();
        }
Beispiel #7
0
        public CategoryForm(ICategories categories, IConfig config, IFolders folders, Category category)
        {
            //
            InitializeComponent();

            // the categories
            _categories = categories;

            // the config
            _config = config;

            // the outlook root project.
            _folders = folders;

            // the category we working with.
            GivenCategory = category;
        }
        public SqlitePersister(IPerformance performance, IList <IFileParser> parsers, ILogger logger,
                               ConfigSqliteDatabase config,
                               int maxNumCharactersPerWords,
                               int maxNumCharactersPerParts
                               )
        {
            // save the logger
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));

            // performance
            _performance = performance ?? throw new ArgumentNullException(nameof(performance));

            // the configuration
            _config = config ?? throw new ArgumentNullException(nameof(config));

            // create the configuration table.
            Config = new SqlitePersisterConfig();

            // create the counters
            Counts = new SqlitePersisterCounts(logger);

            // word parts
            WordsParts = new SqlitePersisterWordsParts(logger);

            // create the words
            Words = new SqlitePersisterWords(performance, WordsParts, maxNumCharactersPerWords, logger);

            // file words.
            FilesWords = new SqlitePersisterFilesWords(Words, logger);

            // create the files / Folders.
            Folders = new SqlitePersisterFolders(Counts, parsers, logger);

            // the parts
            Parts = new SqlitePersisterParts(maxNumCharactersPerParts);

            // the query
            Query = new SqlitePersisterQuery(maxNumCharactersPerParts, logger);
        }
 /// <summary>
 /// Assigns one or more users to a set of folders with an optional set of roles
 /// per folder.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.Edit or SubFolders.Edit) and (Users.View and
 /// Roles.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='assignUsersActionParameters'>
 /// </param>
 public static void AssignUsers(this IFolders operations, AssignUsersActionParameters assignUsersActionParameters = default(AssignUsersActionParameters))
 {
     operations.AssignUsersAsync(assignUsersActionParameters).GetAwaiter().GetResult();
 }
Beispiel #10
0
 /// <summary>
 /// Assigns one or more users to a set of folders with an optional set of roles
 /// per folder.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Folders or Folders.Write.
 ///
 /// Required permissions: (Units.Edit - Assigns users to any folder) and
 /// (SubFolders.Edit - Assigns users only if caller has SubFolders.Edit
 /// permission on all folders provided) and (Users.View and Roles.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task AssignUsersAsync(this IFolders operations, FoldersAssignUsersParameters body = default(FoldersAssignUsersParameters), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.AssignUsersWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Beispiel #11
0
 /// <summary>
 /// Deletes a folder. Succeeds only if no entities or user associations
 /// exist in this folder or any of its descendants.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Folders or Folders.Write.
 ///
 /// Required permissions: (Units.Delete - Deletes any folder) and
 /// (SubFolders.Delete - Deletes folder only if user has SubFolders.Delete
 /// permission on it).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteByIdAsync(this IFolders operations, long key, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteByIdWithHttpMessagesAsync(key, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Returns a page of the user-folder assignments for the input user, including
 /// the roles for each folder.
 /// The response also includes the folders assigned to the directory groups of
 /// the user.
 /// The distinction between the folders assigned directly to the user and the
 /// ones assigned to one of his groups
 /// can be made via the User field of the response.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.View or SubFolders.View) and (Users.View and
 /// Roles.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='username'>
 /// User name
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='take'>
 /// </param>
 public static UserRoleAssignmentsDto GetAllRolesForUserByUsernameAndSkipAndTake(this IFolders operations, string username, int skip, int take)
 {
     return(operations.GetAllRolesForUserByUsernameAndSkipAndTakeAsync(username, skip, take).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Remove user assignment from a folder.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.Edit or SubFolders.Edit) and (Users.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='removeUserFromFolderParameters'>
 /// userId - The Id of the user to remove from the folder
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task RemoveUserFromFolderByIdAsync(this IFolders operations, long id, RemoveUserFromFolderParameters removeUserFromFolderParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     (await operations.RemoveUserFromFolderByIdWithHttpMessagesAsync(id, removeUserFromFolderParameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Returns the users who have access to a folder and optionally the
 /// fine-grained roles each one
 /// has on that folder.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.View or SubFolders.View) and (Users.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='includeInherited'>
 /// If true, the response will include users inherited from ancestors
 /// </param>
 /// <param name='expand'>
 /// Expands related entities inline.
 /// </param>
 /// <param name='filter'>
 /// Filters the results, based on a Boolean condition.
 /// </param>
 /// <param name='select'>
 /// Selects which properties to include in the response.
 /// </param>
 /// <param name='orderby'>
 /// Sorts the results.
 /// </param>
 /// <param name='top'>
 /// Returns only the first n results.
 /// </param>
 /// <param name='skip'>
 /// Skips the first n results.
 /// </param>
 /// <param name='count'>
 /// Includes a count of the matching results in the odata-count header.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ODataResponseListUserRolesDto> GetUsersForFolderByKeyAndIncludeinheritedAsync(this IFolders operations, long key, bool includeInherited, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.GetUsersForFolderByKeyAndIncludeinheritedWithHttpMessagesAsync(key, includeInherited, expand, filter, select, orderby, top, skip, count, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #15
0
 /// <summary>
 /// Remove user assignment from a folder.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Folders or Folders.Write.
 ///
 /// Required permissions: (Units.Edit - Remove user from any folder) and
 /// (SubFolders.Edit - Remove user only if caller has SubFolders.Edit
 /// permission on folder) and (Users.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='body'>
 /// userId - The Id of the user to remove from the folder
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task RemoveUserFromFolderByIdAsync(this IFolders operations, long key, FoldersRemoveUserFromFolderParameters body = default(FoldersRemoveUserFromFolderParameters), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.RemoveUserFromFolderByIdWithHttpMessagesAsync(key, body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Beispiel #16
0
 public Api(string authToken, IFiles files, IFolders folders)
 {
     Files = files;
     Folders = folders;
     RefreshAuthToken(authToken);
 }
 /// <summary>
 /// Returns the machines assigned to a folder.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Folders or Folders.Read.
 ///
 /// Required permissions: (Units.View or SubFolders.View) and (Machines.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='expand'>
 /// Expands related entities inline.
 /// </param>
 /// <param name='filter'>
 /// Filters the results, based on a Boolean condition.
 /// </param>
 /// <param name='select'>
 /// Selects which properties to include in the response.
 /// </param>
 /// <param name='orderby'>
 /// Sorts the results.
 /// </param>
 /// <param name='top'>
 /// Returns only the first n results.
 /// </param>
 /// <param name='skip'>
 /// Skips the first n results.
 /// </param>
 /// <param name='count'>
 /// Includes a count of the matching results in the odata-count header.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ODataValueIEnumerableMachineFolderDto> GetMachinesForFolderByKeyAsync(this IFolders operations, long key, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.GetMachinesForFolderByKeyWithHttpMessagesAsync(key, expand, filter, select, orderby, top, skip, count, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Returns the machines assigned to a folder.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Folders or Folders.Read.
 ///
 /// Required permissions: (Units.View or SubFolders.View) and (Machines.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='expand'>
 /// Expands related entities inline.
 /// </param>
 /// <param name='filter'>
 /// Filters the results, based on a Boolean condition.
 /// </param>
 /// <param name='select'>
 /// Selects which properties to include in the response.
 /// </param>
 /// <param name='orderby'>
 /// Sorts the results.
 /// </param>
 /// <param name='top'>
 /// Returns only the first n results.
 /// </param>
 /// <param name='skip'>
 /// Skips the first n results.
 /// </param>
 /// <param name='count'>
 /// Includes a count of the matching results in the odata-count header.
 /// </param>
 public static ODataValueIEnumerableMachineFolderDto GetMachinesForFolderByKey(this IFolders operations, long key, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?))
 {
     return(operations.GetMachinesForFolderByKeyAsync(key, expand, filter, select, orderby, top, skip, count).GetAwaiter().GetResult());
 }
Beispiel #19
0
 /// <summary>
 /// Returns a page of the user-folder assignments for the input user, including
 /// the roles for each folder.
 /// The response also includes the folders assigned to the directory groups of
 /// the user.
 /// The distinction between the folders assigned directly to the user and the
 /// ones assigned to one of his groups
 /// can be made via the User field of the response.
 /// LIMITATION: If URI parameters contain special characters (eg. \, /), use
 /// instead api/FoldersNavigation/GetAllRolesForUser endpoint.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Folders or Folders.Read.
 ///
 /// Required permissions: (Units.View - Gets roles from all folders) and
 /// (SubFolders.View - Gets roles only from folders where caller has
 /// SubFolders.View permission) and (Users.View and Roles.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='username'>
 /// User name
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='take'>
 /// </param>
 /// <param name='expand'>
 /// Indicates the related entities to be represented inline. The maximum depth
 /// is 2.
 /// </param>
 /// <param name='select'>
 /// Limits the properties returned in the result.
 /// </param>
 public static UserRoleAssignmentsDto GetAllRolesForUserByUsernameAndSkipAndTake(this IFolders operations, string username, int skip, int take, string expand = default(string), string select = default(string))
 {
     return(operations.GetAllRolesForUserByUsernameAndSkipAndTakeAsync(username, skip, take, expand, select).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Assigns one or more users to a set of folders with an optional set of roles
 /// per folder.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.Edit or SubFolders.Edit) and (Users.View and
 /// Roles.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='assignUsersActionParameters'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task AssignUsersAsync(this IFolders operations, AssignUsersActionParameters assignUsersActionParameters = default(AssignUsersActionParameters), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     (await operations.AssignUsersWithHttpMessagesAsync(assignUsersActionParameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Beispiel #21
0
 public void Init(IFolders view)
 {
     _view = view;
     //_view.LoadFolders(MessageFolder.GetMessageFoldersByAccountID(_userSession.CurrentUser.AccountID));
 }
 /// <summary>
 /// Returns the users who have access to a folder and optionally the
 /// fine-grained roles each one
 /// has on that folder.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.View or SubFolders.View) and (Users.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='includeInherited'>
 /// If true, the response will include users inherited from ancestors
 /// </param>
 /// <param name='expand'>
 /// Expands related entities inline.
 /// </param>
 /// <param name='filter'>
 /// Filters the results, based on a Boolean condition.
 /// </param>
 /// <param name='select'>
 /// Selects which properties to include in the response.
 /// </param>
 /// <param name='orderby'>
 /// Sorts the results.
 /// </param>
 /// <param name='top'>
 /// Returns only the first n results.
 /// </param>
 /// <param name='skip'>
 /// Skips the first n results.
 /// </param>
 /// <param name='count'>
 /// Includes a count of the matching results in the odata-count header.
 /// </param>
 public static ODataResponseListUserRolesDto GetUsersForFolderByKeyAndIncludeinherited(this IFolders operations, long key, bool includeInherited, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?))
 {
     return(operations.GetUsersForFolderByKeyAndIncludeinheritedAsync(key, includeInherited, expand, filter, select, orderby, top, skip, count).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Creates a new folder.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.Create - Creates root or subfolder) and
 /// (SubFolders.Create - Creates subfolder if user has SubFoldersCreate
 /// permission on parent).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='folderDto'>
 /// </param>
 public static FolderDto Post(this IFolders operations, FolderDto folderDto)
 {
     return(operations.PostAsync(folderDto).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Remove user assignment from a folder.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.Edit or SubFolders.Edit) and (Users.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='removeUserFromFolderParameters'>
 /// userId - The Id of the user to remove from the folder
 /// </param>
 public static void RemoveUserFromFolderById(this IFolders operations, long id, RemoveUserFromFolderParameters removeUserFromFolderParameters)
 {
     operations.RemoveUserFromFolderByIdAsync(id, removeUserFromFolderParameters).GetAwaiter().GetResult();
 }
Beispiel #25
0
 /// <summary>
 /// Remove user assignment from a folder.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Folders or Folders.Write.
 ///
 /// Required permissions: (Units.Edit - Remove user from any folder) and
 /// (SubFolders.Edit - Remove user only if caller has SubFolders.Edit
 /// permission on folder) and (Users.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='body'>
 /// userId - The Id of the user to remove from the folder
 /// </param>
 public static void RemoveUserFromFolderById(this IFolders operations, long key, FoldersRemoveUserFromFolderParameters body = default(FoldersRemoveUserFromFolderParameters))
 {
     operations.RemoveUserFromFolderByIdAsync(key, body).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets folders.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.View - Gets all folders) and (SubFolders.View
 /// - Gets only folders where user has SubFoldersView permission).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='expand'>
 /// Expands related entities inline.
 /// </param>
 /// <param name='filter'>
 /// Filters the results, based on a Boolean condition.
 /// </param>
 /// <param name='select'>
 /// Selects which properties to include in the response.
 /// </param>
 /// <param name='orderby'>
 /// Sorts the results.
 /// </param>
 /// <param name='top'>
 /// Returns only the first n results.
 /// </param>
 /// <param name='skip'>
 /// Skips the first n results.
 /// </param>
 /// <param name='count'>
 /// Includes a count of the matching results in the response.
 /// </param>
 public static ODataResponseListFolderDto GetFolders(this IFolders operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?))
 {
     return(operations.GetFoldersAsync(expand, filter, select, orderby, top, skip, count).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Edits a folder.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.Edit - Edits any folder) and (SubFolders.Edit
 /// - Edits folder only if user has SubFoldersEdit permission on it).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='folderDto'>
 /// The entity to put
 /// </param>
 public static FolderDto PutById(this IFolders operations, long id, FolderDto folderDto)
 {
     return(operations.PutByIdAsync(id, folderDto).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns a page of the user-folder assignments for the input user, including
 /// the roles for each folder.
 /// The response also includes the folders assigned to the directory groups of
 /// the user.
 /// The distinction between the folders assigned directly to the user and the
 /// ones assigned to one of his groups
 /// can be made via the User field of the response.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.View or SubFolders.View) and (Users.View and
 /// Roles.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='username'>
 /// User name
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='take'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <UserRoleAssignmentsDto> GetAllRolesForUserByUsernameAndSkipAndTakeAsync(this IFolders operations, string username, int skip, int take, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.GetAllRolesForUserByUsernameAndSkipAndTakeWithHttpMessagesAsync(username, skip, take, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Deletes a folder. Succeeds only if no entities or user associations
 /// exist in this folder or any of its descendants.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.Delete - Deletes any folder) and
 /// (SubFolders.Delete - Deletes folder only if user has SubFoldersDelete
 /// permission on it).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='ifMatch'>
 /// If-Match header
 /// </param>
 public static void DeleteById(this IFolders operations, long id, string ifMatch = default(string))
 {
     operations.DeleteByIdAsync(id, ifMatch).GetAwaiter().GetResult();
 }
 public FolderController(IFolders folders)
 {
     this.folders = folders;
 }
 /// <summary>
 /// Deletes a folder. Succeeds only if no entities or user associations
 /// exist in this folder or any of its descendants.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.Delete - Deletes any folder) and
 /// (SubFolders.Delete - Deletes folder only if user has SubFoldersDelete
 /// permission on it).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='ifMatch'>
 /// If-Match header
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteByIdAsync(this IFolders operations, long id, string ifMatch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     (await operations.DeleteByIdWithHttpMessagesAsync(id, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Gets a single folder, based on its Id.
 /// </summary>
 /// <remarks>
 /// Required permissions: (Units.View - Gets any folder) and (SubFolders.View -
 /// Gets folder only if user has SubFoldersView permission on it).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='expand'>
 /// Expands related entities inline.
 /// </param>
 /// <param name='select'>
 /// Selects which properties to include in the response.
 /// </param>
 public static FolderDto GetById(this IFolders operations, long id, string expand = default(string), string select = default(string))
 {
     return(operations.GetByIdAsync(id, expand, select).GetAwaiter().GetResult());
 }
Beispiel #33
0
 /// <summary>
 /// Assigns one or more users to a set of folders with an optional set of roles
 /// per folder.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Folders or Folders.Write.
 ///
 /// Required permissions: (Units.Edit - Assigns users to any folder) and
 /// (SubFolders.Edit - Assigns users only if caller has SubFolders.Edit
 /// permission on all folders provided) and (Users.View and Roles.View).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static void AssignUsers(this IFolders operations, FoldersAssignUsersParameters body = default(FoldersAssignUsersParameters))
 {
     operations.AssignUsersAsync(body).GetAwaiter().GetResult();
 }