Ejemplo n.º 1
0
 public PropertyTreeDefinition ImportType(PropertyTreeDefinition definition)
 {
     if (definition == null)
     {
         throw new ArgumentNullException("definition");
     }
     throw new NotImplementedException();
 }
Ejemplo n.º 2
0
        internal virtual IEnumerable <string> GetSerializationCandidateNamespaces()
        {
            var type   = SourceClrType;
            var result = BaseTypes.Select(t => t.Namespace);

            if (type.GetTypeInfo().IsGenericType&& !type.GetTypeInfo().IsGenericTypeDefinition)
            {
                result = result.Concat(
                    type.GetTypeInfo().GetGenericArguments()
                    .Select(t => {
                    var pd = PropertyTreeDefinition.SafeFromType(t);
                    return(pd == null ? null : pd.Namespace);
                }));
            }

            return(result.Where(t => t != null).Distinct());
        }