Esempio n. 1
0
 private ReadRange(SerializationInfo info, StreamingContext context)
 {
     this.Start      = info.GetValueOrDefault <T>(nameof(this.Start));
     this.End        = info.GetValueOrDefault <T>(nameof(this.End));
     this.IsFromEnd  = info.GetBooleanOrDefault(nameof(this.IsFromEnd));
     this.enumerator = null;
 }
Esempio n. 2
0
        private EnumRange(SerializationInfo info, StreamingContext context)
        {
            if (!Enum <T> .TryParse(info.GetStringOrDefault(nameof(this.Start)), out var start))
            {
                start = default;
            }

            if (!Enum <T> .TryParse(info.GetStringOrDefault(nameof(this.End)), out var end))
            {
                end = default;
            }

            this.Start     = start;
            this.End       = end;
            this.IsFromEnd = info.GetBooleanOrDefault(nameof(this.IsFromEnd));
        }
Esempio n. 3
0
 private ULongRange(SerializationInfo info, StreamingContext context)
 {
     this.Start     = info.GetUInt64OrDefault(nameof(this.Start));
     this.End       = info.GetUInt64OrDefault(nameof(this.End));
     this.IsFromEnd = info.GetBooleanOrDefault(nameof(this.IsFromEnd));
 }