示例#1
0
        public Task SetProviderStateAsync(ProviderState state, CancellationToken cancellationToken)
        {
            var key = $"{state.AcademicYear}|{state.Ukprn}".ToLower();

            _providerState.AddOrUpdate(key, state, (existingKey, existingState) => state);
            return(Task.CompletedTask);
        }
 public void MatchSeedingAction(ProviderState state, InMemoryAgentsService agentsService)
 {
     if (_seedingActions.ContainsKey(state))
     {
         _seedingActions[state].Invoke(agentsService);
     }
 }
        protected override IObservable <LocalisationData> CreateDataSource(IObservable <LocalisationData> rawDataSource)
        {
            if (rawDataSource == null)
            {
                throw new ArgumentNullException("rawDataSource");
            }

            var buffer = new Queue <LocalisationData>(this.EstimationBufferSize + 1);
            var state  = new ProviderState();

            return(base.CreateDataSource(rawDataSource)
                   .Select(
                       current =>
            {
                if (this.EstimationEnabled)
                {
                    TryCorrectData(buffer.OrderBy(data => data.RawData.PositionData.Utc), current, state);

                    buffer.Enqueue(current);
                    if (buffer.Count >= this.EstimationBufferSize)
                    {
                        buffer.Dequeue();
                    }
                }

                return current;
            }));
        }
        public void Ctor_WithProviderState_SetsProviderStateDescription()
        {
            const string provideStateDescription = "my provider state";
            var          providerState           = new ProviderState(provideStateDescription);

            Assert.Equal(provideStateDescription, providerState.ProviderStateDescription);
        }
        public void Ctor_WithSetUpAction_SetsSetUpAction()
        {
            Action setUp         = () => { };
            var    providerState = new ProviderState("my provider state", setUp: setUp);

            Assert.Equal(setUp, providerState.SetUp);
        }
示例#6
0
 public void Create(List <ProviderState> statesRequest)
 {
     using (log.Activity(m => m($"{nameof(Create)} by {Thread.CurrentPrincipal?.Identity?.Name}")))
     {
         using (log.Activity(m => m($"Write {nameof(ProviderState)}")))
         {
             foreach (ProviderState state in statesRequest)
             {
                 var requestWidgetState = state.WidgetStates.FirstOrDefault();
                 if (requestWidgetState == null)
                 {
                     throw new KeyNotFoundException();
                 }
                 var           widgetStates = context.WidgetStates.Where(x => x.Type == requestWidgetState.Type);
                 ProviderState newState     = new ProviderState()
                 {
                     Designation  = state.Designation,
                     StateId      = state.StateId,
                     StandardId   = state.StandardId,
                     WidgetStates = widgetStates.ToList()
                 };
                 context.ProviderStates.Add(newState);
             }
             context.SaveChanges();
         }
     }
 }
        private void AddProviderAgent(AgentInformation agentInfo, ProviderState state)
        {
            string name            = agentInfo.DisplayData.ShortName;
            var    indexAndTooltip = _providerStatesIconIndexAndTooltip[state];

            var item = new ListViewItem(name);

            item.Name      = name;
            item.ForeColor = Color.Yellow;
            item.UseItemStyleForSubItems = true;

            item.ToolTipText = string.Format("{0} - {1} ({2})", agentInfo.PeerNode.Description, agentInfo.DisplayData.Name, indexAndTooltip.ToolTipText);

            if (!agentInfo.Contracts.Contains(typeof(IProviderAgent).AssemblyQualifiedName))
            {
                item.ImageIndex = indexAndTooltip.OperationalIconIndex;
            }
            else
            {
                item.ImageIndex = indexAndTooltip.ProviderIconIndex;
            }

            lvwProviderAgents.Items.Add(item);
            lvwProviderAgents.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
        }
 private void InvokeProviderStateTearDownIfApplicable(ProviderState providerState)
 {
     if (providerState != null && providerState.TearDown != null)
     {
         providerState.TearDown();
     }
 }
 private void InvokeProviderStateSetUpIfApplicable(ProviderState providerState)
 {
     if (providerState != null && providerState.SetUp != null)
     {
         providerState.SetUp();
     }
 }
示例#10
0
        public void Synch(List <ProviderState> states)
        {
            using (log.Activity(m => m($"{nameof(Synch)} by {Thread.CurrentPrincipal?.Identity?.Name}")))
            {
                using (log.Activity(m => m($"Read {nameof(ProviderState)}")))
                {
                    if (!states.Any())
                    {
                        throw new KeyNotFoundException();
                    }
                    var standardIds   = states.Select(x => x.StandardId);
                    var currentStates = context.ProviderStates.Where(x => standardIds.Contains(x.StandardId)).ToList();
                    foreach (ProviderState state in states)
                    {
                        ProviderState currentState = state.StandardId == null?
                                                     currentStates.FirstOrDefault(x => x.Designation == state.Designation) :
                                                         currentStates.FirstOrDefault(x => x.StandardId == state.StandardId);

                        if (currentState == null)
                        {
                            continue;
                        }

                        currentState.Designation = state.Designation;
                        currentState.StateId     = state.StateId;
                    }
                    log.Activity(m => m($"Update {nameof(ProviderState)}"));
                    context.SaveChanges();
                }
            }
        }
示例#11
0
        private void SaveToFile(ProviderState currentProviderState, bool ensureExists = false)
        {
            if (currentProviderState >= ProviderState.UninitializingRecord)
            {
                var filename = Path.Combine(this.ParentAgent.JournalAbsoluteSavePath, this.ParentAgent.ItineraryLogRelativeFilePath);

                if (ensureExists)
                {
                    lock (_lock)
                    {
                        using (var fs = new FileStream(filename, FileMode.OpenOrCreate)) { }
                    }
                }

                var iti = _rtsscTable.Rows.Cast <DataRow>()
                          .Reverse()
                          .Select(r => Tuple.Create(
                                      r.Field <long>("key"),
                                      (IRtssc) new Rtssc {
                    Route     = r.Field <string>("route"),
                    Troncon   = r.Field <string>("troncon"),
                    Section   = r.Field <string>("section"),
                    SousRoute = r.Field <string>("sousRoute"),
                    Longueur  = (long)r.Field <double>("longueur"),
                    Voie      = Convert.ToInt32(r.Field <string>("voie") ?? r.Table.Columns["voie"].DefaultValue),
                    Direction = (DirectionBgr)Convert.ToInt32(r.Field <string>("direction") ?? r.Table.Columns["direction"].DefaultValue)
                },
                                      (double)r.Field <int>("chainageDebut"),
                                      (double)r.Field <int>("chainageFin")))
                          .ToObservable();

                File.WriteAllLines(filename, RtsscHelper.ConvertToItiFormat(iti).ToEnumerable());
            }
        }
示例#12
0
        public void Ctor_WithTearDownAction_SetsTearDownAction()
        {
            Action tearDown      = () => { };
            var    providerState = new ProviderState("my provider state", tearDown: tearDown);

            Assert.Equal(tearDown, providerState.TearDown);
        }
 public SpyMasterProviderStateActionBuilder(SpyMasterProviderStateBuilder spyMasterProviderStateBuilder,
                                            SpyMasterInMemoryProviderStateSeeder spyMasterInMemoryProviderStateSeeder,
                                            ProviderState state)
 {
     _spyMasterProviderStateBuilder        = spyMasterProviderStateBuilder;
     _spyMasterInMemoryProviderStateSeeder = spyMasterInMemoryProviderStateSeeder;
     _state = state;
 }
        private Message InvokeProviderStateSetUp(ProviderState providerState)
        {
            if (providerState.SetUp == null)
            {
                throw new Exception("Expected provider state set up defined.");
            }

            return(providerState.SetUp());
        }
示例#15
0
        public void Setup()
        {
            var providerState = new ProviderState(ProviderName, ConsumerName, _pactDirectory);

            foreach (var interaction in providerState.PactContract.Interactions)
            {
                providerState.SetDynamicPathAndFields(interaction.ProviderState);
            }
        }
示例#16
0
        public void Add_WithProviderState_AddsProviderState()
        {
            const string providerStateDescription = "my provider state";
            var          providerState            = new ProviderState(providerStateDescription);
            var          providerStates           = new ProviderStates();

            providerStates.Add(providerState);

            Assert.Equal(providerState, providerStates.Find(providerStateDescription));
        }
示例#17
0
        public void Add_WithAndAlreadyAddedProviderState_ThrowsArgumentException()
        {
            const string providerStateDescription = "my provider state";
            var          providerState1           = new ProviderState(providerStateDescription);
            var          providerState2           = new ProviderState(providerStateDescription);
            var          providerStates           = new ProviderStates();

            providerStates.Add(providerState1);

            Assert.Throws <ArgumentException>(() => providerStates.Add(providerState2));
        }
示例#18
0
        private static int GetProviderLifecycleEventId(ProviderState providerState)
        {
            switch (providerState)
            {
            case ProviderState.Started:
                return(600);

            case ProviderState.Stopped:
                return(0x259);
            }
            return(-1);
        }
示例#19
0
        public void Handle(ProviderState providerState)
        {
            string id = null;

            if (providerState.Name.StartsWith("A new recipe has been added"))
            {
                id = providerState.Params["recipeId"];
            }
            else if (providerState.Name.StartsWith("There is a recipe with id"))
            {
                id = providerState.Name.Split('`')[1];
            }
            else
            {
                throw new PactVerificationException("Unknown provider state");
            }

            if (id != null)
            {
                var recipe = new Recipe
                {
                    Id           = Guid.Parse(id),
                    Name         = "Pizza dough",
                    Instructions = "Mix the yeast with a little water and the sugar. Let it sit for 10 minutes. " +
                                   "Add the flour, then add the salt and the oil and mix it all up. Then add the rest of the water. " +
                                   "Knead for a good 10 or 15 minutes until the dough can be stetched and isn't too sticky to handle any more. " +
                                   "Let it proof for about an hour covered with a tea towel or some plastic wrap.",
                    Ingredients = new List <Ingredient>
                    {
                        new Ingredient {
                            Name = "Flour", Amount = 190, Unit = "gram"
                        },
                        new Ingredient {
                            Name = "Yeast", Amount = 5, Unit = "gram"
                        },
                        new Ingredient {
                            Name = "Sugar", Amount = 10, Unit = "gram"
                        },
                        new Ingredient {
                            Name = "Water", Amount = 120, Unit = "ml"
                        },
                        new Ingredient {
                            Name = "Olive oil", Amount = 10, Unit = "ml"
                        },
                        new Ingredient {
                            Name = "Salt", Amount = 5, Unit = "gram"
                        }
                    }
                };

                RecipeRepository.Add(recipe);
            }
        }
示例#20
0
文件: TurnProvider.cs 项目: Corne/VOC
        private IBuildTurn GetNextBuildturn()
        {
            if (!playerQueue.Any())
                playerQueue = new Queue<IPlayer>(players.Concat(players));

            var turn = factory.Create<IBuildTurn>(playerQueue.Dequeue());

            if (!playerQueue.Any())
                state = ProviderState.Game;

            return turn;
        }
示例#21
0
        /// <summary>
        /// Define a set up and/or tear down action for a specific state specified by the consumer.
        /// This is where you should set up test data, so that you can fulfil the contract outlined by a consumer.
        /// </summary>
        /// <param name="providerState">The name of the provider state as defined by the consumer interaction, which lives in the Pact file.</param>
        /// <param name="setUp">A set up action that will be run before the interaction verify, if the provider has specified it in the interaction. If no action is required please use an empty lambda () => {}.</param>
        /// <param name="tearDown">A tear down action that will be run after the interaction verify, if the provider has specified it in the interaction. If no action is required please use an empty lambda () => {}.</param>
        public IPactVerifier ProviderState(string providerState, Action setUp = null, Action tearDown = null)
        {
            if (String.IsNullOrEmpty(providerState))
            {
                throw new ArgumentException("Please supply a non null or empty providerState");
            }

            var providerStateItem = new ProviderState(providerState, setUp, tearDown);

            ProviderStates.Add(providerStateItem);

            return(this);
        }
示例#22
0
        /// <summary>
        /// Get provider lifecycle event id based on provider state.
        /// </summary>
        /// <param name="providerState"></param>
        /// <returns></returns>
        private static int GetProviderLifecycleEventId(ProviderState providerState)
        {
            switch (providerState)
            {
            case ProviderState.Started:
                return(_baseProviderLifecycleEventId);

            case ProviderState.Stopped:
                return(_baseProviderLifecycleEventId + 1);
            }

            return(_invalidEventId);
        }
示例#23
0
        public InteractionBuilder Given(ProviderState providerState)
        {
            if (providerState is null)
            {
                throw new ArgumentNullException(nameof(providerState));
            }

            if (_interaction.ProviderStates == null)
            {
                _interaction.ProviderStates = new List <ProviderState>();
            }
            _interaction.ProviderStates.Add(providerState);
            return(this);
        }
示例#24
0
        public void Find_WithProviderStateThatHasBeenAdded_ReturnsProviderState()
        {
            const string providerStateDescription = "my provider state 2";
            var          providerState1           = new ProviderState("my provider state");
            var          providerState2           = new ProviderState(providerStateDescription);
            var          providerStates           = new ProviderStates();

            providerStates.Add(providerState1);
            providerStates.Add(providerState2);

            var actualProviderState = providerStates.Find(providerStateDescription);

            Assert.Equal(providerState2, actualProviderState);
        }
示例#25
0
        public void Find_WithProviderStateThatDoesNotMatchProviderStates_ReturnsNull()
        {
            const string providerStateDescription = "my provider state 2";
            var          providerState1           = new ProviderState("my provider state");
            var          providerState2           = new ProviderState(providerStateDescription);
            var          providerStates           = new ProviderStates();

            providerStates.Add(providerState1);
            providerStates.Add(providerState2);

            var actualProviderState = providerStates.Find("something else");

            Assert.Null(actualProviderState);
        }
        public async Task SetProviderStateAsync(ProviderState state, CancellationToken cancellationToken)
        {
            var entity = new ProviderStateEntity
            {
                PartitionKey           = state.AcademicYear,
                RowKey                 = state.Ukprn.ToString(),
                AcademicYear           = state.AcademicYear,
                Ukprn                  = state.Ukprn,
                NumberOfLearners       = state.NumberOfLearners,
                IgnoredSubmissionCount = state.IgnoredSubmissionCount,
            };

            await InsertOrUpdateAsync(entity, cancellationToken);
        }
        public async Task Given_Contract_Not_In_Pact_Broker__When_Get_Contract__Then_Pact_Not_Found()
        {
            const string provider = "Provider";
            const string consumer = "Consumer";

            using (var client = new HttpClient())
            {
                var providerState = new ProviderState(client, $"{Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.FullName}\\Config");

                var pact = await providerState.GetContract(provider, consumer, client);

                Assert.AreEqual(HttpStatusCode.NotFound, pact.StatusCode);
            }
        }
示例#28
0
        private Task MakeStateTransition(ProviderState startState, ProviderState intermediateState, ProviderState endState, Func <Task> action, Func <Task <bool> > before = null, Func <Task> after = null)
        {
            return(MakeStateTransition(startState, intermediateState, endState,
                                       async() =>
            {
                if (action != null)
                {
                    await action().ConfigureAwait(false);
                }

                return 0;
            },
                                       before, after));
        }
示例#29
0
        public MessageBuilder Given(ProviderState providerState)
        {
            if (providerState is null)
            {
                throw new ArgumentNullException(nameof(providerState));
            }

            if (_message.ProviderStates == null)
            {
                _message.ProviderStates = new List <ProviderState>();
            }
            _message.ProviderStates.Add(providerState);
            return(this);
        }
        /// <summary>
        /// Update distance label related to current acquisition step (and triggered start/stop mode).
        /// </summary>
        private IDisposable UpdateDistanceBeforeTrigger(ProviderState state, TriggeredAcquisitionParameter param)
        {
            IDisposable subscription = null;

            switch (state)
            {
            case ProviderState.StartingRecord:
            case ProviderState.StoppingRecord:
                Label currentLblDistance = state == ProviderState.StartingRecord ? lblDistanceBeforeStartRecord : lblDistanceBeforeStopRecord;
                switch (param.TriggerMode)
                {
                case AcquisitionTriggerMode.Rtssc:
                case AcquisitionTriggerMode.RtsscProximity:
                case AcquisitionTriggerMode.EndSection:
                {
                    subscription = AgentBroker.Instance.ObserveAny <ILocalisationAgent, LocalisationData>("DataSource")
                                   .Sample(UIRefreshInterval)
                                   .ObserveOn(WindowsFormsSynchronizationContext.Current)
                                   .Subscribe(data =>
                        {
                            if (param.GeoCoordinate == null || data == null)
                            {
                                currentLblDistance.Text = "Error!";
                                return;
                            }
                            double distance         = GpsHelper.OrthodromicDistance(param.GeoCoordinate, data.CorrectedData.PositionData) - (param.ProximityRange.HasValue ? param.ProximityRange.Value : 0);
                            currentLblDistance.Text = distance >= 1000 ? Math.Round(distance / 1000, 2).ToString("0.00") + " km" : distance.ToString("0") + " m";
                        });
                    break;
                }

                case AcquisitionTriggerMode.Distance:
                {
                    subscription = AgentBroker.Instance.ObserveAny <IDistanceAgent, DistanceData>("DataSource")
                                   .Sample(UIRefreshInterval)
                                   .ObserveOn(WindowsFormsSynchronizationContext.Current)
                                   .Subscribe(
                        data =>
                        {
                            double distance         = param.Distance.Value - data.AbsoluteDistance;
                            currentLblDistance.Text = distance >= 1000 ? Math.Round(distance / 1000, 2).ToString("0.00") + " km" : distance.ToString("0") + " m";
                        });
                    break;
                }
                }
                break;
            }
            return(subscription);
        }
示例#31
0
文件: TurnProvider.cs 项目: Corne/VOC
        private IHighRollTurn GetNextHighRoll()
        {
            if (playerQueue == null)
                playerQueue = new Queue<IPlayer>(players);

            var turn = factory.Create<IHighRollTurn>(playerQueue.Dequeue());
            highrollresults.Add(turn);
            //CvB Todo: we should reset when multiple with highest value?
            if (!playerQueue.Any())
            {
                OrderPlayersByHighRollResult();
                state = ProviderState.Build;
            }

            return turn;
        }
示例#32
0
        public bool PresetState(ProviderState state)
        {
            presetState = state;
            switch (state)
            {
            case ProviderState.None:
                throw new ProviderStateException("Provider state can not be set to none.");

            case ProviderState.Initialized:
                switch (State)
                {
                case ProviderState.None:
                    return(true);
                }
                break;

            case ProviderState.Started:
                switch (State)
                {
                case ProviderState.None:
                    throw new ProviderStateException("Trying to start a provider that hasn't been initialized.");

                case ProviderState.Initialized:
                    return(true);

                case ProviderState.Closed:
                    throw new ProviderStateException("Trying to start a provider that has been closed.");
                }
                break;

            case ProviderState.Closed:
                switch (State)
                {
                case ProviderState.None:
                    throw new ProviderStateException("Trying to close a provider that hasn't been initialized.");

                case ProviderState.Initialized:
                case ProviderState.Started:
                    return(true);
                }
                return(true);
            }

            return(false);
        }
示例#33
0
        public bool PresetState(ProviderState state)
        {
            presetState = state;
            switch (state)
            {
                case ProviderState.None:
                    throw new ProviderStateException("Provider state can not be set to none.");

                case ProviderState.Initialized:
                    switch(State)
                    {
                        case ProviderState.None:
                            return true;
                    }
                    break;

                case ProviderState.Started:
                    switch(State)
                    {
                        case ProviderState.None:
                            throw new ProviderStateException("Trying to start a provider that hasn't been initialized.");
                        case ProviderState.Initialized:
                            return true;
                        case ProviderState.Closed:
                            throw new ProviderStateException("Trying to start a provider that has been closed.");
                    }
                    break;

                case ProviderState.Closed:
                    switch (State)
                    {
                        case ProviderState.None:
                            throw new ProviderStateException("Trying to close a provider that hasn't been initialized.");
                        case ProviderState.Initialized:
                        case ProviderState.Started:
                            return true;
                    }
                    return true;
            }

            return false;
        }
示例#34
0
 /// <summary>
 /// Provider interface function for logging provider lifecycle event
 /// </summary>
 /// <param name="logContext"></param>
 /// <param name="providerName"></param>
 /// <param name="newState"></param>
 /// 
 internal static void LogProviderLifecycleEvent(LogContext logContext, string providerName, ProviderState newState)
 {
     provider.LogProviderLifecycleEvent(logContext, providerName, newState);
 }
示例#35
0
 internal override void LogProviderLifecycleEvent(LogContext logContext, string providerName, ProviderState newState)
 {
     int providerLifecycleEventId = GetProviderLifecycleEventId(newState);
     if (providerLifecycleEventId != -1)
     {
         Hashtable mapArgs = new Hashtable();
         mapArgs["ProviderName"] = providerName;
         mapArgs["NewProviderState"] = newState.ToString();
         FillEventArgs(mapArgs, logContext);
         EventInstance entry = new EventInstance((long) providerLifecycleEventId, 6) {
             EntryType = EventLogEntryType.Information
         };
         string eventDetail = this.GetEventDetail("ProviderLifecycleContext", mapArgs);
         this.LogEvent(entry, new object[] { providerName, newState, eventDetail });
     }
 }
示例#36
0
        private static int GetProviderLifecycleEventId(ProviderState providerState)
        {
            switch (providerState)
            {
                case ProviderState.Started:
                    return 600;

                case ProviderState.Stopped:
                    return 0x259;
            }
            return -1;
        }
示例#37
0
        /// <summary>
        /// Log provider lifecycle event.
        /// </summary>
        /// <param name="logContext"></param>
        /// <param name="providerName"></param>
        /// <param name="newState"></param>
        internal override void LogProviderLifecycleEvent(LogContext logContext, string providerName, ProviderState newState)
        {
            int eventId = GetProviderLifecycleEventId(newState);

            if (eventId == _invalidEventId)
                return;

            Hashtable mapArgs = new Hashtable();

            mapArgs["ProviderName"] = providerName;
            mapArgs["NewProviderState"] = newState.ToString();

            FillEventArgs(mapArgs, logContext);

            EventInstance entry = new EventInstance(eventId, ProviderLifecycleCategoryId);

            entry.EntryType = EventLogEntryType.Information;

            string detail = GetEventDetail("ProviderLifecycleContext", mapArgs);

            LogEvent(entry, providerName, newState, detail);
        }
示例#38
0
文件: MshLog.cs 项目: 40a/PowerShell
        /// <summary>
        /// LogProviderLifecycleEvent: Log a provider lifecycle event.
        /// 
        /// This is the only form of ProviderLifecycleEvent logging api.
        /// </summary>
        /// <param name="executionContext">Execution Context for current engine that is running</param>
        /// <param name="providerName">Provider name</param>
        /// <param name="providerState">New provider state</param>
        internal static void LogProviderLifecycleEvent(ExecutionContext executionContext,
                                                     string providerName,
                                                     ProviderState providerState)
        {
            if (executionContext == null)
            {
                PSTraceSource.NewArgumentNullException("executionContext");
                return;
            }

            foreach (LogProvider provider in GetLogProvider(executionContext))
            {
                if (NeedToLogProviderLifecycleEvent(provider, executionContext))
                {
                    provider.LogProviderLifecycleEvent(GetLogContext(executionContext, null), providerName, providerState);
                }
            }
        }
示例#39
0
        /// <summary>
        /// Provider interface function for logging provider lifecycle event
        /// </summary>
        /// <param name="logContext"></param>
        /// <param name="providerName"></param>
        /// <param name="newState"></param>
        /// 
        internal override void LogProviderLifecycleEvent(LogContext logContext, string providerName, ProviderState newState)
        {
            if (IsEnabled(PSLevel.Informational, PSKeyword.Cmdlets | PSKeyword.UseAlwaysAnalytic))
            {
                StringBuilder payload = new StringBuilder();

                payload.AppendLine(StringUtil.Format(EtwLoggingStrings.ProviderStateChange, providerName, newState.ToString()));

                PSTask task = PSTask.ProviderStart;

                if (newState == ProviderState.Stopped)
                {
                    task = PSTask.ProviderStop;
                }

                WriteEvent(PSEventId.Provider_Lifecycle, PSChannel.Analytic, PSOpcode.Method, task, logContext, payload.ToString());
            }
        }
示例#40
0
        /// <summary>
        /// Get provider lifecycle event id based on provider state.
        /// </summary>
        /// <param name="providerState"></param>
        /// <returns></returns>
        private static int GetProviderLifecycleEventId(ProviderState providerState)
        {
            switch (providerState)
            {
                case ProviderState.Started:
                    return _baseProviderLifecycleEventId;
                case ProviderState.Stopped:
                    return _baseProviderLifecycleEventId + 1;
            }

            return _invalidEventId;
        }
示例#41
0
 internal abstract void LogProviderLifecycleEvent(LogContext logContext, string providerName, ProviderState newState);
示例#42
0
 public void CommitState()
 {
     State = presetState;
 }
示例#43
0
 public ProviderStateManager()
 {
     State = ProviderState.None;
 }
示例#44
0
 internal override void LogProviderLifecycleEvent(LogContext logContext, string providerName, ProviderState newState)
 {
 }