public HealthReporterFactory(
     IInstanceAccessor instance,
     IEnumerable <IHealthReportProvider> providers)
 {
     _instance  = instance;
     _providers = providers;
 }
Beispiel #2
0
 public MetadataPerformance(IDependencyResolver resolver)
 {
     _instance            = new MetadataType();
     _metadata            = resolver.Resolve <IMetadataProvider>().GetMetadata <MetadataType>();
     _propertyAccessor    = _metadata.GetProperty("Property");
     _propertyInfo        = typeof(MetadataType).GetProperty("Property");
     _constructorAccessor = _metadata.GetConstructor();
 }
Beispiel #3
0
        protected internal SqlBuilderBase(IMetadataProvider metadataProvider)
        {
            metadataProvider.ThrowIfNull(nameof(metadataProvider));

            _metadata               = metadataProvider.GetMetadata <TEntity>();
            _entityType             = _metadata.Type;
            _entityInstanceAccessor = _metadata.GetConstructor();
        }
 protected internal DataReaderMapperBase(IMetadataProvider metadataProvider, IDataReader dataReader)
 {
     _metadata         = metadataProvider.GetMetadata <TPoco>();
     _instanceAccessor = _metadata.GetConstructor();
     _tableColumns     = _metadata.GetDeclaredOnlyProperties()
                         .Where(x => x.MemberType.IsPrimitiveExtended())
                         .ToList();
     _dataReader = dataReader;
 }
Beispiel #5
0
        public EntityMapper(IMetadataProvider metadataProvider)
        {
            _dtoMetadata         = metadataProvider.GetMetadata <TDto>();
            _dtoInstanceAccessor = _dtoMetadata.GetConstructor();
            _dtoProperties       = _dtoMetadata.GetDeclaredOnlyProperties();

            _entityMetadata         = metadataProvider.GetMetadata <TEntity>();
            _entityInstanceAccessor = _entityMetadata.GetConstructor();
            _entityProperties       = _entityMetadata.GetDeclaredOnlyProperties();
        }
 public InstanceAccessor()
 {
     _impl = new MachineNameInstanceAccessor();
 }
 public InstanceAccessor(ServiceContext context)
 {
     _impl = new ServiceFabricInstanceAccessor(context);
 }