Пример #1
0
        SpaceUsage enc.IEncodable <SpaceUsage> .Decode(enc.IDecoder decoder)
        {
            using (var obj = decoder.GetObject())
            {
                this.Used       = obj.GetField <ulong>("used");
                this.Allocation = obj.GetFieldObject <SpaceAllocation>("allocation");
            }

            return(this);
        }
Пример #2
0
        /// <summary>
        /// <para>Initializes a new instance of the <see cref="SpaceUsage" /> class.</para>
        /// </summary>
        /// <param name="used">The user's total space usage (bytes).</param>
        /// <param name="allocation">The user's space allocation.</param>
        public SpaceUsage(ulong used,
                          SpaceAllocation allocation)
        {
            if (allocation == null)
            {
                throw new sys.ArgumentNullException("allocation");
            }

            this.Used       = used;
            this.Allocation = allocation;
        }