private AvaloniaXamlSchemaContext(IRuntimeTypeProvider typeProvider)
        //better not set the references assemblies
        //TODO: check this on iOS
        //: base(typeProvider.ReferencedAssemblies)
        {
            Contract.Requires <ArgumentNullException>(typeProvider != null);

            _avaloniaTypeProvider = typeProvider;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SelectExpressionFactory{T}"/> class.
 /// </summary>
 public SelectExpressionFactory(IMemberNameResolver nameResolver, IRuntimeTypeProvider runtimeTypeProvider)
 {
     _nameResolver        = nameResolver;
     _runtimeTypeProvider = runtimeTypeProvider;
     _knownSelections     = new Dictionary <string, Expression <Func <T, object> > >
     {
         { string.Empty, null }
     };
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="SelectExpressionFactory{T}"/> class.
        /// </summary>
        public SelectExpressionFactory(IMemberNameResolver nameResolver, IRuntimeTypeProvider runtimeTypeProvider)
        {
            CustomContract.Requires <ArgumentNullException>(nameResolver != null);
            CustomContract.Requires <ArgumentNullException>(runtimeTypeProvider != null);

            _nameResolver        = nameResolver;
            _runtimeTypeProvider = runtimeTypeProvider;
            _knownSelections     = new Dictionary <string, Expression <Func <T, object> > >
            {
                { string.Empty, null }
            };
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="SelectExpressionFactory{T}"/> class.
        /// </summary>
        public SelectExpressionFactory(IMemberNameResolver nameResolver, IRuntimeTypeProvider runtimeTypeProvider)
        {
            if (nameResolver == null)
            {
                throw new ArgumentNullException("nameResolver");
            }

            if (runtimeTypeProvider == null)
            {
                throw new ArgumentNullException("runtimeTypeProvider");
            }

            m_nameResolver        = nameResolver;
            m_runtimeTypeProvider = runtimeTypeProvider;
            m_knownSelections     = new Dictionary <string, Expression <Func <T, object> > >
            {
                { string.Empty, null }
            };
        }
 public static AvaloniaXamlSchemaContext Create(IRuntimeTypeProvider typeProvider = null)
 {
     return(new AvaloniaXamlSchemaContext(typeProvider ?? new AvaloniaRuntimeTypeProvider()));
 }