Beispiel #1
0
 protected RefObjects(string fullName, string name)
 {
     _ref                 = new RefObject();
     _refVector           = new List <RefObject>();
     _refList             = new LinkedList <RefObject>();
     _refMap              = new Dictionary <int, RefObject>();
     _refNullable         = null;
     _refRequired         = new RefObject();
     _refRequiredOptional = new RefObject();
 }
Beispiel #2
0
        public static ArraySegment <byte> Convert(RefObject value, ArraySegment <byte> unused)
        {
            Interlocked.Increment(ref ConvertFromRefObjectCount);

            return(new ArraySegment <byte>(Encoding.ASCII.GetBytes(value.Value)));
        }
Beispiel #3
0
        public static RefObject Convert(ArraySegment <byte> value, RefObject unused)
        {
            Interlocked.Increment(ref ConvertToRefObjectCount);

            return(new RefObject(Encoding.ASCII.GetString(value.Array, value.Offset, value.Count)));
        }