void InitArgs(Type objType)
 {
     if (objType == Globals.TypeOfDateTimeOffsetAdapter)
     {
         objLocal = DateTimeOffsetAdapter.GetDateTimeOffsetAdapter((DateTimeOffset)obj);
     }
     else
     {
         objLocal = CodeInterpreter.ConvertValue(obj, typeof(object), objType);
     }
 }
        private static object ResolveAdapterType(object obj, ClassDataContract classContract)
        {
            Type type = obj.GetType();

            if (type == Globals.TypeOfDateTimeOffset)
            {
                obj = DateTimeOffsetAdapter.GetDateTimeOffsetAdapter((DateTimeOffset)obj);
            }
            else if (type == Globals.TypeOfMemoryStream)
            {
                obj = MemoryStreamAdapter.GetMemoryStreamAdapter((MemoryStream)obj);
            }
            return(obj);
        }
        private object ResolveAdapterType(object obj, ClassDataContract classContract)
        {
            Type type = obj.GetType();

            if (type == Globals.TypeOfDateTimeOffset)
            {
                obj = DateTimeOffsetAdapter.GetDateTimeOffsetAdapter((DateTimeOffset)obj);
            }
            else if (type.IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfKeyValuePair)
            {
                obj = classContract.KeyValuePairAdapterConstructorInfo.Invoke(new object[] { obj });
            }

            return(obj);
        }