Example #1
0
        /// <summary>
        /// ファイルを上書きアップロードします。
        /// </summary>
        /// <param name="fileId">上書きするファイルの ID。</param>
        /// <param name="file">アップロードするファイルの情報。</param>
        /// <param name="share">true (アップロードしたファイルを共有する場合)、false (それ以外の場合)。</param>
        /// <param name="message">通知メールに含めるメッセージ。</param>
        /// <param name="emails">共有ファイルの情報を通知するユーザのメールアドレスの配列。</param>
        /// <returns>アップロードしたファイルの情報。</returns>
        public UploadedFile Overwrite(long fileId, UploadFile file, bool share, string message, string[] emails)
        {
            var result = OverwriteFunction.Execute(AuthToken, fileId, file, share, message, emails);

            if (result.Status != "upload_ok")
            {
                HandleErrorStatus(result.Status);
            }

            return(result.Files[0]);
        }
Example #2
0
        public DocumentSchema(DocumentMapping mapping)
        {
            _mapping = mapping;

            Table  = new DocumentTable(_mapping);
            Upsert = new UpsertFunction(_mapping);
            Insert = new InsertFunction(_mapping);
            Update = new UpdateFunction(_mapping);

            if (_mapping.UseOptimisticConcurrency)
            {
                Overwrite = new OverwriteFunction(_mapping);
            }
        }
Example #3
0
        public DocumentSchema(DocumentMapping mapping)
        {
            _mapping = mapping;

            Table = new DocumentTable(_mapping);

            foreach (var metadataColumn in Table.Columns.OfType <MetadataColumn>())
            {
                metadataColumn.RegisterForLinqSearching(mapping);
            }

            Upsert = new UpsertFunction(_mapping);
            Insert = new InsertFunction(_mapping);
            Update = new UpdateFunction(_mapping);

            if (_mapping.UseOptimisticConcurrency)
            {
                Overwrite = new OverwriteFunction(_mapping);
            }
        }