Пример #1
0
        /// <summary>
        /// Called when am existing configuration package has been removed.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">PackageAddedEventArgs&lt;ConfigurationPackage&gt; instance.</param>
        private void Context_ConfigurationPackageRemovedEvent(object sender, PackageRemovedEventArgs <ConfigurationPackage> e)
        {
            Guard.ArgumentNotNull(e, nameof(e));

            // Attempt to load the configuration.
            LoadConfiguration(e.Package.Path, e.Package.Settings.Sections);
        }
 private void OnContextOnCodePackageRemovedEvent(
     object sender,
     PackageRemovedEventArgs <CodePackage> args)
 {
     this.OnCodePackageRemoved.NotifyAsync(
         this,
         new ServiceEventPayloadOnPackageRemoved <CodePackage>(args.Package))
     .GetAwaiter()
     .GetResult();
 }
Пример #3
0
        private void CodePackageActivationContext_ConfigurationPackageRemovedEvent(object sender,
                                                                                   PackageRemovedEventArgs <ConfigurationPackage> e)
        {
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            ReadSettings(e.Package);
        }
        /// <summary>
        /// Called when am existing configuration package has been removed.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">PackageAddedEventArgs&lt;ConfigurationPackage&gt; instance.</param>
        void ConfigurationPackageRemoved(object sender, PackageRemovedEventArgs <ConfigurationPackage> e)
        {
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            // Attempt to load the configuration.
            this.LoadConfiguration(e.Package.Path, e.Package.Settings.Sections);
        }
Пример #5
0
 private void ConfigurationPackageRemovedEvent(object sender, PackageRemovedEventArgs <ConfigurationPackage> e)
 {
     DumpConfiguration(ConfigurationPackageEvent.Removed, e.Package);
 }
Пример #6
0
 public void OnDataPackageRemovedEvent(PackageRemovedEventArgs <DataPackage> e)
 {
     DataPackageRemovedEvent?.Invoke(this, e);
 }
Пример #7
0
 public void OnConfigurationPackageRemovedEvent(PackageRemovedEventArgs <ConfigurationPackage> e)
 {
     ConfigurationPackageRemovedEvent?.Invoke(this, e);
 }
Пример #8
0
 public void OnCodePackageRemovedEvent(PackageRemovedEventArgs <CodePackage> e)
 {
     CodePackageRemovedEvent?.Invoke(this, e);
 }
        private void CodePackageActivationContext_ConfigurationPackageRemovedEvent(object sender, PackageRemovedEventArgs <ConfigurationPackage> e)
        {
            try
            {
                // Create diagnostic pipeline
                diagnosticsPipeline = ServiceFabricDiagnosticPipelineFactory.CreatePipeline("LongRunningActors-EventCollectorService-DiagnosticsPipeline");

                // Log success
                ServiceEventSource.Current.Message("Diagnostics Pipeline successfully created.");
            }
            catch (Exception ex)
            {
                // Log exception
                ServiceEventSource.Current.Error(ex);
            }
        }