コード例 #1
0
 /// <summary>Ctor
 /// </summary>
 /// <param name="fileId">文件FileId</param>
 /// <param name="groupName">组名</param>
 /// <param name="metaData">MetaData</param>
 /// <param name="option">MetaDataOption</param>
 public SetMetaData(string fileId, string groupName, IDictionary <string, string> metaData, MetaDataOption option) : this()
 {
     FileId    = fileId;
     GroupName = groupName;
     MetaData  = metaData;
     Option    = option;
 }
コード例 #2
0
ファイル: FastDFSClient.cs プロジェクト: cocosip/FastDFSCore
        /// <summary>
        /// 设置文件媒体信息
        /// </summary>
        /// <param name="storageNode">GetStorageNode方法返回的存储节点</param>
        /// <param name="fileId"></param>
        /// <param name="metaData">MetaData数据</param>
        /// <param name="option"></param>
        /// <param name="clusterName">集群名称</param>
        /// <returns></returns>
        public async ValueTask SetMetaData(
            StorageNode storageNode,
            string fileId,
            IDictionary <string, string> metaData,
            MetaDataOption option = MetaDataOption.Overwrite,
            string clusterName    = "")
        {
            var request = new SetMetaData(fileId, storageNode.GroupName, metaData, option);

            _ = await _executer.Execute(request, clusterName);
        }
コード例 #3
0
 public static void SetMetaData(StorageNode storageNode, string fileName, IDictionary<string, string> metadata, MetaDataOption option = MetaDataOption.Overwrite)
 {
     FDFSRequest storageRequest = SET_METADATA.Instance.GetRequest(storageNode.EndPoint, storageNode.GroupName, fileName, metadata, option);
     storageRequest.GetResponse(); // no response body
 }
コード例 #4
0
        public static void SetMetaData(StorageNode storageNode, string fileName, IDictionary <string, string> metadata, MetaDataOption option = MetaDataOption.Overwrite)
        {
            FDFSRequest storageRequest = SET_METADATA.Instance.GetRequest(storageNode.EndPoint, storageNode.GroupName, fileName, metadata, option);

            storageRequest.GetResponse(); // no response body
        }
コード例 #5
0
 /// <summary>
 /// 设置文件媒体信息
 /// </summary>
 /// <param name="storageNode">GetStorageNode方法返回的存储节点</param>
 /// <param name="fileId"></param>
 /// <param name="metaData">MetaData数据</param>
 /// <param name="option"></param>
 /// <returns></returns>
 public async Task SetMetaData(StorageNode storageNode, string fileId, IDictionary <string, string> metaData, MetaDataOption option = MetaDataOption.Overwrite)
 {
     var request  = new SetMetaData(fileId, storageNode.GroupName, metaData, option);
     var response = await _executer.Execute(request);
 }