예제 #1
0
 public Mapper()
 {
   _assemblyRepository = new AssemblyRepository();
   _typeRepository = new TypeRepository(_assemblyRepository);
   _memberRepository = new MemberRepository(_typeRepository);
   _modelCreator = new ModelCreator(_typeRepository, _memberRepository);
 }
예제 #2
0
 public AvaloniaXamlMember(string name,
     XamlType owner,
     ITypeRepository xamlTypeRepository,
     ITypeFeatureProvider featureProvider)
     : base(name, owner, xamlTypeRepository, featureProvider)
 {
 }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MethodInfoTypeFactory"/> class.
        /// </summary>
        /// <param name="typeRepository">The type repository.</param>
        public MethodInfoTypeFactory(ITypeRepository typeRepository)
        {
            if (typeRepository == null)
                throw new ArgumentNullException("typeRepository");

            _typeRepository = typeRepository;
        }
 public VehicleEditorModel(ICustomerRepository customerRepository, IVehicleGroupRepository vehicleGroupRepository,
     IVehicleRepository vehicleRepository,
     IVehicleDetailRepository vehicleDetailRepository, IVehicleWheelRepository vehicleWheelRepository,
     ISparepartRepository sparepartRepository, ITypeRepository typeRepository,
     ISpecialSparepartDetailRepository wheelDetailRepository, IBrandRepository brandRepository,
     ISparepartDetailRepository sparepartDetailRepository,
     ISpecialSparepartDetailRepository specialSparepartDetailRepository,
     ISparepartStockCardRepository sparepartStokCardRepository,
     IReferenceRepository referenceRepository,
     IUnitOfWork unitOfWork)
     : base()
 {
     _customerRepository = customerRepository;
     _vehicleGroupRepository = vehicleGroupRepository;
     _vehicleRepository = vehicleRepository;
     _vehicleDetailRepository = vehicleDetailRepository;
     _vehicleWheelRepository = vehicleWheelRepository;
     _specialSparepartDetailRepository = wheelDetailRepository;
     _sparepartDetailRepository = sparepartDetailRepository;
     _sparepartRepository = sparepartRepository;
     _typeRepository = typeRepository;
     _brandRepository = brandRepository;
     _sparepartStokCardRepository = sparepartStokCardRepository;
     _referenceRepository = referenceRepository;
     _unitOfWork = unitOfWork;
 }
 public TypeEditorModel(ITypeRepository typeRepository,
     IUnitOfWork unitOfWork)
     : base()
 {
     _typeRepository = typeRepository;
     _unitOfWork = unitOfWork;
 }
예제 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProxyTypeBuilder"/> class.
        /// </summary>
        /// <param name="typeRepository">The type repository.</param>
        /// <param name="parentType">The parent type.</param>
        public ProxyTypeBuilder(ITypeRepository typeRepository, Type parentType)
        {
            if (typeRepository == null)
                throw new ArgumentNullException("typeRepository");

            if (parentType == null)
                throw new ArgumentNullException("parentType");

            if (parentType.IsSealed)
                throw new ArgumentException(Resources.ParentTypeMustNotBeSealed, "parentType");

            if (parentType.IsGenericTypeDefinition)
                throw new ArgumentException(Resources.ParentTypeMustNotBeAGenericTypeDefinition, "parentType");

            _typeRepository = typeRepository;
            _parentType = parentType;

            _typeBuilder = typeRepository.DefineType("Proxy" , parentType);

            _invocationHandlerFieldInfo = _typeBuilder.DefineField(
                "_invocationHandler",
                typeof (IInvocationHandler),
                FieldAttributes.Private | FieldAttributes.InitOnly);

            _interfaceTypes = new HashSet<Type>();
        }
예제 #7
0
 public WpfAttachableMember(string name,
     MethodInfo getter,
     MethodInfo setter,
     ITypeRepository typeRepository,
     ITypeFeatureProvider typeFeatureProvider)
     : base(name, getter, setter, typeRepository, typeFeatureProvider)
 {
 }
 public PerspexAttachableXamlMember(string name,
     XamlType owner,
     MethodInfo getter,
     MethodInfo setter,
     ITypeRepository xamlTypeRepository,
     ITypeFeatureProvider featureProvider)
     : base(name, getter, setter, xamlTypeRepository, featureProvider)
 {
 }
예제 #9
0
        private Type ResolveFromString(string type, ITypeRepository typeRepository)
        {
            Guard.ThrowIfNull(type, nameof(type));

            var split = type.Split(':');
            var prefix = split.Length == 1 ? split[0] : null;
            var typeName = split.Length == 1 ? split[1] : split[0];
            var xamlType = typeRepository.GetByPrefix(prefix, typeName);
            return xamlType.UnderlyingType;
        }
예제 #10
0
 public ModelCreator(ITypeRepository typeRepository, IMemberRepository memberRepository)
 {
   _types.Push(TypeKey.None);
   _methods.Push(MethodKey.None);
   _properties.Push(PropertyKey.None);
   _fields.Push(FieldKey.None);
   _events.Push(EventKey.None);
   _typeRepository = typeRepository;
   _memberRepository = memberRepository;
 }
예제 #11
0
 public AttachableMember(string name,
     MethodInfo getter,
     MethodInfo setter,
     ITypeRepository typeRepository,
     ITypeFeatureProvider featureProvider) : base(name, typeRepository.GetByType(getter.DeclaringType), typeRepository, featureProvider)
 {
     this.getter = getter;
     this.setter = setter;
     XamlType = LookupType();
 }
예제 #12
0
        public TypeService()
        {
            try
            {
                string typeStr1 = ConfigurationManager.AppSettings["typeRepository"];
                Type type1 = Type.GetType(typeStr1);
                repo = (ITypeRepository)Activator.CreateInstance(type1);

                repo.SourcePath = System.Web.Hosting.HostingEnvironment.MapPath("~/App_data/type.xml");
            }
            catch (Exception ex) { }
        }
예제 #13
0
        public XamlType(Type type, ITypeRepository typeRepository, ITypeFactory typeTypeFactory, ITypeFeatureProvider featureProvider)
        {
            Guard.ThrowIfNull(type, nameof(type));
            Guard.ThrowIfNull(typeRepository, nameof(typeRepository));
            Guard.ThrowIfNull(featureProvider, nameof(featureProvider));

            TypeRepository = typeRepository;
            TypeFactory = typeTypeFactory;
            FeatureProvider = featureProvider;
            UnderlyingType = type;
            Name = type.Name;
        }
예제 #14
0
파일: Context.cs 프로젝트: josacore/CarsMvc
 public Context(DbContext context = null, 
             IUserRepository users = null,
             IUserProfileRepository profiles = null,
             IModelRepository models = null,
             IBrandRepository brands = null,
             ITypeRepository types =null,
             ICarRepository cars =null,
             IImageCarRepository imageCars =null)
 {
     _db = context ?? new CarDatabase();
     Users = users ?? new UserRepository(_db,true);
     Profiles = profiles ?? new UserProfileRepository(_db, true);
     Models = models ?? new ModelRepository(_db, true);
     Brands = brands ?? new BrandRepository(_db, true);
     Types = types ?? new TypeRepository(_db, true);
     Cars = cars ?? new CarRepository(_db, true);
     ImageCars = imageCars ?? new ImageCarRepository(_db, true);
 }
예제 #15
0
 public AvaloniaXamlType(Type type,
     ITypeRepository typeRepository,
     ITypeFactory typeFactory,
     ITypeFeatureProvider featureProvider) : base(type, typeRepository, typeFactory, featureProvider)
 {
 }
예제 #16
0
 public TypeService(ITypeRepository typeRepository, IProductService productService)
 {
     _typeRepository = typeRepository;
     _productService = productService;
 }
예제 #17
0
 public AuthorController(IAuthorRepository _authRepo, IBookRepository _bookRepo, ITypeRepository _typeRepo)
 {
     authorRepository = _authRepo;
     bookRepository   = _bookRepo;
     typeRepository   = _typeRepo;
 }
예제 #18
0
 public TypeService(ITypeRepository typeRepository)
 {
     _typeRepository = typeRepository;
 }
예제 #19
0
 // Ctor
 public AdminTypeController (ITypeRepository  repo)
     => typeRepository = repo;
 private static XamlInstructionBuilder CreateBuilder(ITypeRepository typeRepository)
 {
     return new XamlInstructionBuilder(typeRepository);
 }
예제 #21
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context    = context;
     CycleEvents = new CycleEventRepository(_context);
     Types       = new TypeRepository(_context);
 }
예제 #22
0
 public DeviceService(ILogger <DeviceService> log, IMapper mapper, IDeviceRepository dr, IProjectService ps, ITypeHardwareConfigService th, ITypeRepository tr)
 {
     this._log    = log;
     this._mapper = mapper;
     this._dr     = dr;
     this._ps     = ps;
     this._th     = th;
     this._tr     = tr;
 }
예제 #23
0
 public Member(string name, XamlType declaringType, ITypeRepository typeRepository, ITypeFeatureProvider featureProvider)
     : base(name, declaringType, typeRepository, featureProvider)
 {
     XamlType = LookupType();
 }
 public FunctionalTypeController(ITypeRepository typeRepository)
 {
     _typeRepository = typeRepository;
 }
예제 #25
0
 public BookController(ILanguageRepository _languageRepo, IPublisherRepository _publisherRepo, IBookRepository _bookRepo, ITypeRepository _typeRepo, IAuthorRepository _authRepo)
 {
     bookRepository      = _bookRepo;
     typeRepository      = _typeRepo;
     authorRepository    = _authRepo;
     publisherRepository = _publisherRepo;
     languageRepository  = _languageRepo;
 }
예제 #26
0
 public ValueCommand(StateCommuter stateCommuter, ITypeRepository typeSource, ITopDownValueContext topDownValueContext, string value) : base(stateCommuter)
 {
     this.value = value;
     ValuePipeLine = new ValuePipeline(typeSource, topDownValueContext);
 }
예제 #27
0
 public XamlInstructionBuilder(ITypeRepository registry)
 {
     this.registry = registry;
 }
예제 #28
0
 public RuntimeTypeSource(ITypeRepository typeRepository, INamespaceRegistry nsRegistry)
 {
     TypeRepository = typeRepository;
     NamespaceRegistry = nsRegistry;
 }
예제 #29
0
 public TypeSystemService(ILogger <TypeSchemaService> log, IMapper mapper, ITypeSystemRepository tsr, ITypeRepository tr)
 {
     this._log    = log;
     this._mapper = mapper;
     this._tsr    = tsr;
     this._tr     = tr;
 }
예제 #30
0
 public TypeUpdateFileService(ILogger <TypeUpdateFileService> log, IMapper mapper, ITypeUpdateFileRepository tu, ITypeRepository tr)
 {
     this._log    = log;
     this._mapper = mapper;
     this._tu     = tu;
     this._tr     = tr;
 }
예제 #31
0
 public RecipeController(IProductRepository product, IRecipeRepository recipe, ITypeRepository type)
 {
     productRepository = product;
     recipeRepository  = recipe;
     typeRepository    = type;
 }
예제 #32
0
 public ZoningDomainService(ITypeRepository typeRepository)
 {
     _typeRepository = typeRepository;
 }
예제 #33
0
 public StartObjectCommand(StateCommuter stateCommuter, ITypeRepository typeRepository, XamlType xamlType, object rootInstance) : base(stateCommuter)
 {
     this.typeRepository = typeRepository;
     this.xamlType = xamlType;
     this.rootInstance = rootInstance;
 }
 public TypeController(ITypeRepository repo, ILogger logger)
 {
     _repo   = repo;
     _logger = logger;
 }
예제 #35
0
 public MemberRepository(ITypeRepository typeRepository)
 {
   _typeRepository = typeRepository;
 }
예제 #36
0
 public TypeConfigService(ILogger <TypeConfigService> log, ITypeConfigRepository tc, IMapper mapper, ITypeRepository tr)
 {
     this._log    = log;
     this._tc     = tc;
     this._mapper = mapper;
     this._tr     = tr;
 }
예제 #37
0
 public ValuesController(IProductRepository productContext, ITypeRepository productTypeRepository)
 {
     _productContext     = productContext;
     _productTypeContext = productTypeRepository;
 }
 public TypeListModel(ITypeRepository typeRepository, IUnitOfWork unitOfWork)
     : base()
 {
     _typeRepository = typeRepository;
     _unitOfWork     = unitOfWork;
 }
 public DeviceController(IDeviceRepository deviceRepository, IManufacturerRepository manufacturerRepository, ITypeRepository typeRepository,
                         IOperatingSystemRepository operatingSystemRepository, IOSversionRepository osVersionRepository, IRAMamountRepository ramAmountRepository,
                         IProcessorRepository processorRepository, IUserRepository userRepository)
 {
     _deviceRepository          = deviceRepository;
     _manufacturerRepository    = manufacturerRepository;
     _typeRepository            = typeRepository;
     _operatingSystemRepository = operatingSystemRepository;
     _osVersionRepository       = osVersionRepository;
     _ramAmountRepository       = ramAmountRepository;
     _processorRepository       = processorRepository;
     _userRepository            = userRepository;
 }
예제 #40
0
 public WpfMember(string name, XamlType declaringType, ITypeRepository typeRepository, ITypeFeatureProvider typeFeatureProvider)
     : base(name, declaringType, typeRepository, typeFeatureProvider)
 {
 }
예제 #41
0
 public TypesController(ITypeRepository typeRepository)
 {
     _typeRepository = typeRepository;
 }
예제 #42
0
 public TypeMenuViewComponent(ITypeRepository repo)
 {
     _repository = repo;
 }
예제 #43
0
 public EndMemberCommand(ITypeRepository typeRepository, StateCommuter stateCommuter, IValueContext valueContext) : base(stateCommuter)
 {
     this.typeRepository = typeRepository;
     this.valueContext   = valueContext;
 }
예제 #44
0
 public EndMemberCommand(ITypeRepository typeRepository, StateCommuter stateCommuter) : base(stateCommuter)
 {
     this.typeRepository = typeRepository;
 }
예제 #45
0
 public TypeService(ITypeRepository typeRepository, IUnitOfWork unitOfWork)
 {
     this._typeRepository = typeRepository;
     this._unitOfWork     = unitOfWork;
 }
 public TypesSeeds(ITypeRepository typeRepository)
 {
     _typeRepository = typeRepository;
 }
예제 #47
0
 public HomeController(ILogger <HomeController> logger, ITypeRepository typeRepository)
 {
     _logger         = logger;
     _typeRepository = typeRepository;
 }
예제 #48
0
 public TypeService(ITypeRepository typeRepository)
 {
     this.typeRepository = typeRepository;
 }
예제 #49
0
 public XamlTypeMock(Type type, ITypeRepository typeRepository, ITypeFactory typeTypeFactory, ITypeFeatureProvider featureProvider)
     : base(type, typeRepository, typeTypeFactory, featureProvider)
 {
 }
예제 #50
0
 public EndMemberCommand(ITypeRepository typeRepository, StateCommuter stateCommuter, IValueContext valueContext)
     : base(stateCommuter)
 {
     this.typeRepository = typeRepository;
     this.valueContext = valueContext;
 }
예제 #51
0
 public ValueContext(ITypeRepository typeRepository, ITopDownValueContext topDownValueContext, IReadOnlyDictionary<string, object> parsingDictionary)
 {
     this.typeRepository = typeRepository;
     this.topDownValueContext = topDownValueContext;
     this.parsingDictionary = parsingDictionary;
 }
예제 #52
0
 public DeviceController(IDeviceRepository repository, ICampaignRepository campaign, ITypeRepository type, IUsersRepository usersRepository)
 {
     _repository      = repository;
     _campaign        = campaign;
     _typeRepository  = type;
     _usersRepository = usersRepository;
 }
예제 #53
0
        public static XamlType Create(Type underlyingType,
            ITypeRepository typeRepository,
            ITypeFactory typeFactory,
            ITypeFeatureProvider featureProvider)
        {
            Guard.ThrowIfNull(underlyingType, nameof(typeRepository));

            return new XamlType(underlyingType, typeRepository, typeFactory, featureProvider);
        }
예제 #54
0
 public PerspexXamlType(Type type,
     ITypeRepository typeRepository,
     ITypeFactory typeFactory,
     ITypeFeatureProvider featureProvider) : base(type, typeRepository, typeFactory, featureProvider)
 {
 }
예제 #55
0
 public Member(string name, XamlType declaringType, ITypeRepository typeRepository, ITypeFeatureProvider featureProvider)
     : base(name, declaringType, typeRepository, featureProvider)
 {
     XamlType = LookupType();
 }
예제 #56
0
 public RuntimeTypeSource(ITypeRepository typeRepository, INamespaceRegistry nsRegistry)
 {
     TypeRepository    = typeRepository;
     NamespaceRegistry = nsRegistry;
 }
예제 #57
0
 public AnothersExpenseController(UserManager <User> userManager, SignInManager <User> signInManager, ITypeRepository typeRepository,
                                  IAnothersExpenseRepository anothersExpenseRepository, ICategoryRepository categoryRepository)
 {
     _userManager               = userManager;
     _signInManager             = signInManager;
     _anothersExpenseRepository = anothersExpenseRepository;
     _categoryRepository        = categoryRepository;
     _typeRepository            = typeRepository;
 }
예제 #58
0
 public ImageController(IImageRepository imageRepository, IHashRepository hashRepository, ITypeRepository typeRepository, IConfiguration configuration, IHttpClientFactory clientFactory)
 {
     ImageRepository   = imageRepository;
     HashRepository    = hashRepository;
     TypeRepository    = typeRepository;
     Configuration     = configuration;
     HttpClientFactory = clientFactory;
 }
예제 #59
0
 public ValuePipeline(ITypeRepository typeRepository, ITopDownValueContext topDownValueContext)
 {
     this.typeRepository = typeRepository;
     this.topDownValueContext = topDownValueContext;
 }
예제 #60
0
 public UploadController(ITypeRepository typeRepository)
 {
     this.typeRepository = typeRepository;
 }