コード例 #1
0
 // Token: 0x060005C0 RID: 1472 RVA: 0x00015D34 File Offset: 0x00013F34
 public bool DeleteValue(string propertyName, bool isIgnoreIfNotExist, ReadWriteConstraints constraints)
 {
     return(this.BaseParameters.KeyFactory.RunOperationAndTranslateException <bool>(OperationCategory.DeleteValue, this.FullKeyName, delegate()
     {
         ReadOptions readOptions = this.GetReadOptions(constraints);
         WriteOptions writeOptions = this.GetWriteOptions(constraints);
         DxStoreAccessRequest.DeleteProperty deleteProperty = this.CreateRequest <DxStoreAccessRequest.DeleteProperty>();
         deleteProperty.Name = propertyName;
         deleteProperty.ReadOptions = readOptions;
         deleteProperty.WriteOptions = writeOptions;
         DxStoreAccessReply.DeleteProperty deleteProperty2 = this.BaseParameters.Client.DeleteProperty(deleteProperty, null);
         this.SetReadResult(constraints, deleteProperty2.ReadResult);
         this.SetWriteResult(constraints, deleteProperty2.WriteResult);
         if (!deleteProperty2.IsExist && !isIgnoreIfNotExist)
         {
             throw new DxStorePropertyNotFoundException(propertyName);
         }
         return deleteProperty2.IsExist;
     }, false));
 }
コード例 #2
0
        private DxStoreAccessReply.DeleteProperty DeletePropertyInternal(DxStoreAccessRequest.DeleteProperty request)
        {
            bool isStale = !this.EnsureInstanceReadyAndNotStale(request.ReadOptions);

            DxStoreAccessReply.DeleteProperty deleteProperty = this.CreateReply <DxStoreAccessReply.DeleteProperty>();
            deleteProperty.ReadResult = new ReadResult
            {
                IsStale = isStale
            };
            deleteProperty.IsExist = this.instance.LocalDataStore.IsPropertyExist(request.FullKeyName, request.Name);
            if (deleteProperty.IsExist)
            {
                DxStoreCommand.DeleteProperty command = new DxStoreCommand.DeleteProperty
                {
                    KeyName = request.FullKeyName,
                    Name    = request.Name
                };
                deleteProperty.WriteResult = this.ExecuteCommand(command, request.WriteOptions, this.UpdateTimeout);
            }
            return(this.FinishRequest <DxStoreAccessReply.DeleteProperty>(deleteProperty));
        }
コード例 #3
0
 public DxStoreAccessReply.DeleteProperty DeleteProperty(DxStoreAccessRequest.DeleteProperty request)
 {
     return(this.RunServerOperationAndConvertToFaultException <DxStoreAccessRequest.DeleteProperty, DxStoreAccessReply.DeleteProperty>(request, (DxStoreAccessRequest.DeleteProperty req) => this.DeletePropertyInternal(req)));
 }