/// <summary>
        /// <para>Initializes a new instance of the <see
        /// cref="TeamSelectiveSyncSettingsChangedDetails" /> class.</para>
        /// </summary>
        /// <param name="previousValue">Previous value.</param>
        /// <param name="newValue">New value.</param>
        public TeamSelectiveSyncSettingsChangedDetails(global::Dropbox.Api.Files.SyncSetting previousValue,
                                                       global::Dropbox.Api.Files.SyncSetting newValue)
        {
            if (previousValue == null)
            {
                throw new sys.ArgumentNullException("previousValue");
            }

            if (newValue == null)
            {
                throw new sys.ArgumentNullException("newValue");
            }

            this.PreviousValue = previousValue;
            this.NewValue      = newValue;
        }
Exemple #2
0
        /// <summary>
        /// <para>Initializes a new instance of the <see cref="TeamFolderMetadata" />
        /// class.</para>
        /// </summary>
        /// <param name="teamFolderId">The ID of the team folder.</param>
        /// <param name="name">The name of the team folder.</param>
        /// <param name="status">The status of the team folder.</param>
        /// <param name="isTeamSharedDropbox">True if this team folder is a shared team
        /// root.</param>
        /// <param name="syncSetting">The sync setting applied to this team folder.</param>
        /// <param name="contentSyncSettings">Sync settings applied to contents of this team
        /// folder.</param>
        public TeamFolderMetadata(string teamFolderId,
                                  string name,
                                  TeamFolderStatus status,
                                  bool isTeamSharedDropbox,
                                  global::Dropbox.Api.Files.SyncSetting syncSetting,
                                  col.IEnumerable <global::Dropbox.Api.Files.ContentSyncSetting> contentSyncSettings)
        {
            if (teamFolderId == null)
            {
                throw new sys.ArgumentNullException("teamFolderId");
            }
            if (!re.Regex.IsMatch(teamFolderId, @"\A(?:[-_0-9a-zA-Z:]+)\z"))
            {
                throw new sys.ArgumentOutOfRangeException("teamFolderId", @"Value should match pattern '\A(?:[-_0-9a-zA-Z:]+)\z'");
            }

            if (name == null)
            {
                throw new sys.ArgumentNullException("name");
            }

            if (status == null)
            {
                throw new sys.ArgumentNullException("status");
            }

            if (syncSetting == null)
            {
                throw new sys.ArgumentNullException("syncSetting");
            }

            var contentSyncSettingsList = enc.Util.ToList(contentSyncSettings);

            if (contentSyncSettings == null)
            {
                throw new sys.ArgumentNullException("contentSyncSettings");
            }

            this.TeamFolderId        = teamFolderId;
            this.Name                = name;
            this.Status              = status;
            this.IsTeamSharedDropbox = isTeamSharedDropbox;
            this.SyncSetting         = syncSetting;
            this.ContentSyncSettings = contentSyncSettingsList;
        }