public PutTapeDensityDirectiveSpectraS3Request(TapeDriveType density, string partitionId, TapeType tapeType)
        {
            this.Density = density;
            this.PartitionId = partitionId;
            this.TapeType = tapeType;

            this.QueryParams.Add("density", density.ToString());

            this.QueryParams.Add("partition_id", partitionId);

            this.QueryParams.Add("tape_type", tapeType.ToString());
        }
        public PutTapeStorageDomainMemberSpectraS3Request(string storageDomainId, string tapePartitionId, TapeType tapeType)
        {
            this.StorageDomainId = storageDomainId;
            this.TapePartitionId = tapePartitionId;
            this.TapeType = tapeType;

            this.QueryParams.Add("storage_domain_id", storageDomainId);

            this.QueryParams.Add("tape_partition_id", tapePartitionId);

            this.QueryParams.Add("tape_type", tapeType.ToString());
        }
Esempio n. 3
0
        /// <summary>
        /// Десериализирует ленту из бинарного представления.
        /// </summary>
        private Tape(SerializationInfo info, StreamingContext context)
        {
            try
            {
                _type = (TapeType)info.GetValue("type", typeof(TapeType));

                int n = info.GetInt32("amount");
                for(int i = 0; i < n; i++)
                {
                    AddBlock(info.GetValue("block" + i.ToString(), typeof(TapeBlock)) as TapeBlock);
                }
            }
            catch(Exception ex)
            {
                throw new ArgumentException(string.Format("Неверные параметры десериализации: \"{0}\"", ex.Message), ex);
            }
        }
 public GetBucketCapacitySummarySpectraS3Request WithTapeType(TapeType? tapeType)
 {
     this._tapeType = tapeType;
     if (tapeType != null)
     {
         this.QueryParams.Add("tape_type", tapeType.ToString());
     }
     else
     {
         this.QueryParams.Remove("tape_type");
     }
     return this;
 }
 public GetStorageDomainMembersSpectraS3Request WithTapeType(TapeType? tapeType)
 {
     this._tapeType = tapeType;
     if (tapeType != null)
     {
         this.QueryParams.Add("tape_type", tapeType.ToString());
     }
     else
     {
         this.QueryParams.Remove("tape_type");
     }
     return this;
 }
 public GetTapesSpectraS3Request WithType(TapeType? type)
 {
     this._type = type;
     if (type != null)
     {
         this.QueryParams.Add("type", type.ToString());
     }
     else
     {
         this.QueryParams.Remove("type");
     }
     return this;
 }
 public GetTapeDensityDirectivesSpectraS3Request WithTapeType(TapeType? tapeType)
 {
     this._tapeType = tapeType;
     if (tapeType != null)
     {
         this.QueryParams.Add("tape_type", tapeType.ToString());
     }
     else
     {
         this.QueryParams.Remove("tape_type");
     }
     return this;
 }
Esempio n. 8
0
 /// <summary>
 /// Инициализирует ленту с заданным типом.
 /// </summary>
 /// <param name="type">Тип создаваемой ленты.</param>
 public Tape(TapeType type)
 {
     _type = type;
 }