Exemplo n.º 1
0
        /// <summary>
        /// Main constructor
        /// </summary>
        /// <param name="provider">Provider for known values</param>
        /// <param name="targetInputBox">Text box to write selected value</param>
        /// <param name="isAppended">true to append selected value to textbox, false to replace existing value</param>
        public ParameterKnownValuesDialog(IValuesProvider provider, TextBox targetInputBox, bool isAppended)
        {
            InitializeComponent();

            currentProvider = provider;
            textBox         = targetInputBox;
            isValueAppended = isAppended;
            _InitializeContents();
        }
        public ValuesController(IValuesProvider valuesProvider, IOptions<ValuesControllerConfiguration> optionsAccessor)
        {
            if(valuesProvider == null)
                throw new ArgumentException("valuesProvider");
            if (optionsAccessor?.Value == null)
                throw new ArgumentException("optionsAccessor");

            _valuesProvider = valuesProvider;
            _configuration = optionsAccessor.Value;
        }
    public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
    {
        IValuesProvider test = context.Instance as IValuesProvider;

        if (test != null)
        {
            return(true);
        }
        else
        {
            return(base.GetStandardValuesSupported());
        }
    }
        public ValuesController(IOptions<ValuesControllerConfiguration> optionsAccessor, IValuesProvider valuesProvider, ILogger<ValuesController> logger)
        {
            if (optionsAccessor?.Value == null)
                throw new ArgumentNullException(nameof(optionsAccessor));
            if (valuesProvider == null)
                throw new ArgumentNullException(nameof(valuesProvider));
            if(logger == null)
                throw new ArgumentNullException(nameof(logger));

            _configuration = optionsAccessor.Value;
            _valuesProvider = valuesProvider;
            _logger = logger;
        }
Exemplo n.º 5
0
        public ValuesController(IValuesProvider valuesProvider, IOptions <ValuesControllerConfiguration> optionsAccessor)
        {
            if (valuesProvider == null)
            {
                throw new ArgumentException("valuesProvider");
            }
            if (optionsAccessor?.Value == null)
            {
                throw new ArgumentException("optionsAccessor");
            }

            _valuesProvider = valuesProvider;
            _configuration  = optionsAccessor.Value;
        }
 public ValuesController(IValuesProvider provider)
 {
     _provider = provider;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ValuesController"/> class.
 /// </summary>
 /// <param name="valuesProvider">The values provider.</param>
 public ValuesController(IValuesProvider valuesProvider)
 {
     this.valuesProvider = valuesProvider;
 }
Exemplo n.º 8
0
 public static IStream <TOut> CrossApply <TIn, TOut>(this IStream <TIn> stream, string name, IValuesProvider <TIn, TOut> valuesProvider, bool noParallelisation = false)
 {
     return(new CrossApplyStreamNode <TIn, TOut>(name, new CrossApplyArgs <TIn, TOut>
     {
         NoParallelisation = noParallelisation,
         Stream = stream,
         ValuesProvider = valuesProvider
     }).Output);
 }
Exemplo n.º 9
0
 public static IStream <TOut> CrossApply <TIn, TRes, TValueIn, TValueOut, TOut>(this IStream <TIn> stream, string name, IStream <TRes> resourceStream, IValuesProvider <TValueIn, TRes, TValueOut> valuesProvider, Func <TIn, TRes, TValueIn> inputValueSelector, Func <TValueOut, TIn, TRes, TOut> outputValueSelector)
 {
     return(new CrossApplyStreamNode <TIn, TRes, TValueIn, TValueOut, TOut>(name, new CrossApplyArgs <TIn, TRes, TValueIn, TValueOut, TOut>
     {
         MainStream = stream,
         GetValueIn = inputValueSelector,
         GetValueOut = outputValueSelector,
         ValuesProvider = valuesProvider,
         StreamToApply = resourceStream
     }).Output);
 }
Exemplo n.º 10
0
 public static IStream <Correlated <TOut> > CrossApply <TIn, TOut>(this IStream <Correlated <TIn> > stream, string name, IValuesProvider <TIn, TOut> valuesProvider, bool noParallelisation = false)
 {
     return(new CrossApplyStreamNode <Correlated <TIn>, Correlated <TOut> >(name, new CrossApplyArgs <Correlated <TIn>, Correlated <TOut> >
     {
         NoParallelisation = noParallelisation,
         Stream = stream,
         ValuesProvider = new ValueProviderCorrelationWrapper <TIn, TOut>(valuesProvider)
     }).Output);
 }
Exemplo n.º 11
0
 public ValueProviderWrapper(IValuesProvider <TInnerIn, TInnerOut> innerValueProvider, Func <TIn, TInnerIn> getInnerIn, Func <TInnerOut, TIn, TOut> getOut)
 {
     _innerValueProvider = innerValueProvider;
     this._getInnerIn    = getInnerIn;
     this._getOut        = getOut;
 }
Exemplo n.º 12
0
 public ValuesController(IValuesProvider provider)
 {
     _provider = provider;
 }
Exemplo n.º 13
0
 public ValuesController(IValuesProvider valueProvider)
 {
     _valueProvider = valueProvider;
 }
Exemplo n.º 14
0
 public ValuesCollector(IValuesProvider performanceCounter, INodeRefCreator nodeRefCreator, string statType)
 {
     _performanceCounter = performanceCounter;
     _nodeRefCreator     = nodeRefCreator;
     _statType           = statType;
 }
Exemplo n.º 15
0
 public static IStream <TOut> CrossApply <TIn, TRes, TOut>(this IStream <TIn> stream, string name, IStream <TRes> resourceStream, IValuesProvider <TIn, TRes, TOut> valuesProvider)
 {
     return(new CrossApplyStreamNode <TIn, TRes, TIn, TOut, TOut>(name, new CrossApplyArgs <TIn, TRes, TIn, TOut, TOut>
     {
         MainStream = stream,
         GetValueIn = (i, j) => i,
         GetValueOut = (i, j, k) => i,
         ValuesProvider = valuesProvider,
         StreamToApply = resourceStream
     }).Output);
 }
Exemplo n.º 16
0
 public ValueProviderCorrelationWrapper(IValuesProvider <TInnerIn, TInnerOut> innerValueProvider) :
     base(innerValueProvider, i => i.Row, (i, j) => new Correlated <TInnerOut> {
     Row = i, CorrelationKeys = j.CorrelationKeys
 })
 {
 }
    public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
    {
        IValuesProvider item = context.Instance as IValuesProvider;

        return(new StandardValuesCollection(item.GetValues()));
    }
 /// <summary>
 /// Initializes a new instance of the <see cref="ValuesController"/> class.
 /// </summary>
 /// <param name="valuesProvider">The values provider.</param>
 public ValuesController(IValuesProvider valuesProvider)
 {
     this.valuesProvider = valuesProvider;
 }
Exemplo n.º 19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValuesController"/> class.
 /// </summary>
 /// <param name="valuesProvider">The values provider.</param>
 public ValuesController(IValuesProvider valuesProvider1, IValuesProvider valuesProvider2)
 {
     this.valuesProvider1 = valuesProvider1;
     this.valuesProvider2 = valuesProvider2;
 }
Exemplo n.º 20
0
 public ValuesManager(IValuesProvider valuesProvider, ISessionManager sessionManager) : base(sessionManager)
 {
     mConstructionIfno = "This manager is instantiated by system, by Dependency Injection!";
     _valuesProvider   = valuesProvider;
 }
Exemplo n.º 21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValuesController"/> class.
 /// </summary>
 /// <param name="valuesProvider">The values provider.</param>
 public ValuesController(IValuesProvider valuesProvider1, IValuesProvider valuesProvider2)
 {
     this.valuesProvider1 = valuesProvider1;
     this.valuesProvider2 = valuesProvider2;
 }
Exemplo n.º 22
0
 public ValuesController(IValuesProvider provider, IDisposableValuesProvider disposableProvider)
 {
     _provider = provider;
     _disposableProvider = disposableProvider;
 }
Exemplo n.º 23
0
 public static IStream <TOut> CrossApply <TIn, TOut>(this IStream <TIn> stream, string name, IValuesProvider <TIn, TOut> valuesProvider)
 {
     return(new CrossApplyStreamNode <TIn, TIn, TOut, TOut>(name, new CrossApplyArgs <TIn, TIn, TOut, TOut>
     {
         Stream = stream,
         GetValueIn = i => i,
         GetValueOut = (i, j) => i,
         ValuesProvider = valuesProvider
     }).Output);
 }