コード例 #1
0
        public static bool IsSpeciallySerialized(System.Type tp)
        {
            if (tp == null)
            {
                throw new System.ArgumentNullException("tp");
            }

            if (typeof(IPersistentUnityObject).IsAssignableFrom(tp))
            {
                return(true);
            }

            return(SimpleUnityStructureSurrogate.IsSpeciallySerialized(tp));
        }
コード例 #2
0
 public ISerializationSurrogate GetSurrogate(Type type, StreamingContext context, out ISurrogateSelector selector)
 {
     if (SimpleUnityStructureSurrogate.IsSpeciallySerialized(type))
     {
         selector = this;
         return(this);
     }
     else if (_nextSelector != null)
     {
         return(_nextSelector.GetSurrogate(type, context, out selector));
     }
     else
     {
         selector = null;
         return(null);
     }
 }