예제 #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);
            }
        }