Inheritance: Serialize.Linq.Nodes.Node
コード例 #1
0
        public virtual Type ResolveType(TypeNode node)
        {
            if (node == null) throw new ArgumentNullException("node");

            if (string.IsNullOrWhiteSpace(node.Name)) return null;

            return _typeCache.GetOrAdd(node.Name, ResolveTypeByName);
        }
コード例 #2
0
        public virtual Type ResolveType(TypeNode node)
        {
            if (node == null)
                throw new ArgumentNullException("node");

            if (string.IsNullOrWhiteSpace(node.Name))
                return null;

            return _typeCache.GetOrAdd(node.Name, n =>
            {
                var type = Type.GetType(n);
                if (type == null)
                {
                    foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
                    {
                        type = assembly.GetType(n);
                        if (type != null)
                            break;
                    }

                }
                return type;
            });
        }
コード例 #3
0
 protected override void Initialize(TypeBinaryExpression expression)
 {
     Expression  = Factory.Create(expression.Expression);
     TypeOperand = Factory.Create(expression.TypeOperand);
 }