├── samples
├── reacting-on-service-package-events
│ ├── Service
│ │ ├── PackageRoot
│ │ │ ├── CodeNew
│ │ │ │ └── directory.txt
│ │ │ ├── Data
│ │ │ │ └── Data.xml
│ │ │ ├── DataNew
│ │ │ │ └── DataNew.xml
│ │ │ ├── Config
│ │ │ │ └── Settings.xml
│ │ │ └── ConfigNew
│ │ │ │ └── SettingsNew.xml
│ │ ├── appsettings.Development.json
│ │ ├── appsettings.json
│ │ └── Properties
│ │ │ └── launchSettings.json
│ └── App
│ │ ├── packages.config
│ │ ├── ApplicationParameters
│ │ ├── Cloud.xml
│ │ ├── Local.1Node.xml
│ │ └── Local.5Node.xml
│ │ └── PublishProfiles
│ │ ├── Local.1Node.xml
│ │ └── Local.5Node.xml
├── using-local-runtime
│ ├── Service
│ │ ├── PackageRoot
│ │ │ ├── Data
│ │ │ │ └── Data-Sample.xml
│ │ │ └── Config
│ │ │ │ └── Settings.xml
│ │ ├── appsettings.Development.json
│ │ ├── appsettings.json
│ │ └── Properties
│ │ │ └── launchSettings.json
│ └── App
│ │ ├── packages.config
│ │ ├── ApplicationParameters
│ │ ├── Cloud.xml
│ │ ├── Local.1Node.xml
│ │ └── Local.5Node.xml
│ │ ├── PublishProfiles
│ │ ├── Local.1Node.xml
│ │ └── Local.5Node.xml
│ │ └── ApplicationPackageRoot
│ │ └── ApplicationManifest.xml
├── using-hierarchical-dependency-registration
│ ├── Service
│ │ ├── src
│ │ │ ├── ISharedService.cs
│ │ │ ├── IPersonalService.cs
│ │ │ ├── SharedService.cs
│ │ │ └── PersonalService.cs
│ │ ├── PackageRoot
│ │ │ └── Config
│ │ │ │ └── Settings.xml
│ │ └── Properties
│ │ │ └── launchSettings.json
│ └── App
│ │ ├── packages.config
│ │ ├── ApplicationParameters
│ │ ├── Cloud.xml
│ │ ├── Local.1Node.xml
│ │ └── Local.5Node.xml
│ │ └── PublishProfiles
│ │ ├── Local.1Node.xml
│ │ └── Local.5Node.xml
├── configuring-service
│ ├── App
│ │ ├── packages.config
│ │ ├── ApplicationParameters
│ │ │ ├── Cloud.xml
│ │ │ ├── Local.1Node.xml
│ │ │ └── Local.5Node.xml
│ │ ├── PublishProfiles
│ │ │ ├── Local.1Node.xml
│ │ │ └── Local.5Node.xml
│ │ └── ApplicationPackageRoot
│ │ │ └── ApplicationManifest.xml
│ └── Service
│ │ ├── appsettings.Development.json
│ │ ├── PackageRoot
│ │ └── Config
│ │ │ └── Settings.xml
│ │ ├── appsettings.json
│ │ ├── Properties
│ │ └── launchSettings.json
│ │ └── src
│ │ └── Controllers
│ │ └── ApiController.cs
├── configuring-custom-event-source
│ ├── App
│ │ ├── packages.config
│ │ ├── ApplicationParameters
│ │ │ ├── Cloud.xml
│ │ │ ├── Local.1Node.xml
│ │ │ └── Local.5Node.xml
│ │ ├── PublishProfiles
│ │ │ ├── Local.1Node.xml
│ │ │ └── Local.5Node.xml
│ │ └── ApplicationPackageRoot
│ │ │ └── ApplicationManifest.xml
│ └── Service
│ │ ├── appsettings.Development.json
│ │ ├── PackageRoot
│ │ └── Config
│ │ │ └── Settings.xml
│ │ ├── src
│ │ ├── IApiServiceEventSource.cs
│ │ └── Controllers
│ │ │ └── ApiController.cs
│ │ ├── appsettings.json
│ │ └── Properties
│ │ └── launchSettings.json
├── configuring-multiple-services
│ ├── App
│ │ ├── packages.config
│ │ ├── ApplicationParameters
│ │ │ ├── Cloud.xml
│ │ │ ├── Local.1Node.xml
│ │ │ └── Local.5Node.xml
│ │ └── PublishProfiles
│ │ │ ├── Local.1Node.xml
│ │ │ └── Local.5Node.xml
│ └── Services
│ │ ├── appsettings.Development.json
│ │ ├── PackageRoot
│ │ └── Config
│ │ │ └── Settings.xml
│ │ ├── appsettings.json
│ │ ├── Properties
│ │ └── launchSettings.json
│ │ └── src
│ │ ├── Controllers
│ │ ├── StatefulController.cs
│ │ └── StatelessController.cs
│ │ ├── StatefulControllersFeature.cs
│ │ └── StatelessControllersFeature.cs
└── reacting-on-service-lifecycle-events
│ ├── App
│ ├── packages.config
│ ├── ApplicationParameters
│ │ ├── Cloud.xml
│ │ ├── Local.1Node.xml
│ │ └── Local.5Node.xml
│ └── PublishProfiles
│ │ ├── Local.1Node.xml
│ │ └── Local.5Node.xml
│ └── Service
│ ├── appsettings.Development.json
│ ├── PackageRoot
│ └── Config
│ │ └── Settings.xml
│ ├── appsettings.json
│ └── Properties
│ └── launchSettings.json
├── favicon.png
├── .devcontainer
├── Dockerfile
└── devcontainer.json
├── src
├── CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests
│ ├── src
│ │ ├── ITestDependency.cs
│ │ ├── TestDependency.cs
│ │ ├── ITestOpenGenericDependency.cs
│ │ ├── TestRemotingImplementation.cs
│ │ ├── TestOpenGenericDependency.cs
│ │ ├── ITestRemotingService.cs
│ │ ├── Mocks
│ │ │ ├── MockServiceRemotingListenerImplementation.cs
│ │ │ ├── IMockServiceRemotingListenerImplementation.cs
│ │ │ ├── MockServiceEventSource.cs
│ │ │ ├── MockGenericCommunicationListener.cs
│ │ │ ├── MockServiceRemotingRequestMessageBodySerializer.cs
│ │ │ └── MockServiceRemotingResponseMessageBodySerializer.cs
│ │ ├── Theories
│ │ │ ├── Extensions
│ │ │ │ ├── IUseListenerEndpointTheoryExtension.cs
│ │ │ │ ├── IUseDelegateTheoryExtension.cs
│ │ │ │ ├── IUseDelegateEventTheoryExtension.cs
│ │ │ │ ├── IPickListenerEndpointTheoryExtension.cs
│ │ │ │ ├── IPickDependencyTheoryExtension.cs
│ │ │ │ ├── IUseDependenciesTheoryExtension.cs
│ │ │ │ ├── IConfigureDependenciesTheoryExtension.cs
│ │ │ │ ├── IUseAspNetCoreListenerWebHostBuilderTheoryExtension.cs
│ │ │ │ ├── IPickRemotingListenerImplementationTheoryExtension.cs
│ │ │ │ ├── IUseRemotingListenerImplementationTheoryExtension.cs
│ │ │ │ ├── IPickRemotingListenerHandlerTheoryExtension.cs
│ │ │ │ ├── IUseGenericListenerCommunicationListenerTheoryExtension.cs
│ │ │ │ ├── IUseRemotingListenerCommunicationListenerTheoryExtension.cs
│ │ │ │ ├── IUseAspNetCoreListenerCommunicationListenerTheoryExtension.cs
│ │ │ │ ├── IUseEventSourceImplementationTheoryExtension.cs
│ │ │ │ ├── IUseRemotingListenerHandlerTheoryExtension.cs
│ │ │ │ ├── IUseRemotingListenerSettingsTheoryExtension.cs
│ │ │ │ ├── IPickRemotingListenerSettingsTheoryExtension.cs
│ │ │ │ ├── IUseRemotingListenerSerializerTheoryExtension.cs
│ │ │ │ ├── IPickRemotingListenerSerializationProviderTheoryExtension.cs
│ │ │ │ ├── IUseDelegateInvokerTheoryExtension.cs
│ │ │ │ ├── UseListenerEndpointTheoryExtension.cs
│ │ │ │ ├── UseDelegateTheoryExtension.cs
│ │ │ │ ├── UseDependenciesTheoryExtension.cs
│ │ │ │ ├── PickListenerEndpointTheoryExtension.cs
│ │ │ │ ├── UseStatefulDelegateEventTheoryExtension.cs
│ │ │ │ ├── UseStatelessDelegateEventTheoryExtension.cs
│ │ │ │ └── ConfigureDependenciesTheoryExtension.cs
│ │ │ └── Items
│ │ │ │ └── TheoryItemSetup.cs
│ │ └── TestRemotingImplementationWithParameters.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
└── CoherentSolutions.Extensions.Hosting.ServiceFabric
│ └── src
│ ├── Fabric
│ ├── IStatelessService.cs
│ ├── IServiceEventSourceInterface.cs
│ ├── IStatefulServiceHost.cs
│ ├── IStatelessServiceHost.cs
│ ├── IStatelessServiceInformation.cs
│ ├── Proxynator
│ │ └── IProxynatorProxy.cs
│ ├── Runtime
│ │ ├── Configurations
│ │ │ ├── DataPackageElement.cs
│ │ │ ├── IServiceManifestReader.cs
│ │ │ ├── ServiceTypeElementKind.cs
│ │ │ ├── StatelessServiceTypeElement.cs
│ │ │ ├── ConfigurationPackageElement.cs
│ │ │ ├── IServicePackage.cs
│ │ │ ├── ServiceTypeElement.cs
│ │ │ ├── ResourcesElement.cs
│ │ │ ├── EnvironmentVariableElement.cs
│ │ │ ├── CodePackageElement.cs
│ │ │ ├── ConfigurationSectionElement.cs
│ │ │ ├── PackageElement.cs
│ │ │ ├── ConfigurationSettingsElement.cs
│ │ │ ├── EndpointElement.cs
│ │ │ ├── ConfigurationParameterElement.cs
│ │ │ └── ServiceManifestProvider.cs
│ │ ├── ActivationContexts
│ │ │ ├── IPackageFactory.cs
│ │ │ ├── CodePackageFactory.cs
│ │ │ ├── DataPackageFactory.cs
│ │ │ ├── CodePackageAccessor.cs
│ │ │ ├── DataPackageAccessor.cs
│ │ │ ├── CodePackageDescriptionAccessor.cs
│ │ │ ├── DataPackageDescriptionAccessor.cs
│ │ │ └── ICodePackageActivationContextReader.cs
│ │ └── NodeContexts
│ │ │ └── NodeContextProvider.cs
│ ├── IServiceHostListenerInformation.cs
│ ├── IStatelessServiceHostListenerReplicaTemplateParameters.cs
│ ├── IServiceHostGenericListenerInformation.cs
│ ├── IServiceHostRemotingListenerInformation.cs
│ ├── IStatefulServiceEventPayloadOnShutdown.cs
│ ├── IStatelessServiceHostListenerReplicaTemplateConfigurator.cs
│ ├── IStatelessServiceEventPayloadOnShutdown.cs
│ ├── IServiceEventPayloadOnPackageAdded.cs
│ ├── IServiceEventPayloadOnPackageRemoved.cs
│ ├── ServiceHostListenerType.cs
│ ├── IServiceHostListenerReplicaTemplateParameters.cs
│ ├── IStatefulServiceDelegateInvocationContext.cs
│ ├── IStatefulServiceEventPayloadOnDataLoss.cs
│ ├── IStatelessServiceDelegateInvocationContext.cs
│ ├── IStatefulService.cs
│ ├── IServiceEventSource.cs
│ ├── IServiceHostAspNetCoreListenerInformation.cs
│ ├── IStatefulServiceEventPayloadOnChangeRole.cs
│ ├── IStatefulServiceHostBuilder.cs
│ ├── IStatefulServiceHostListenerReplicaTemplateConfigurator.cs
│ ├── IStatefulServiceHostListenerReplicaTemplateParameters.cs
│ ├── IServiceHostDelegateReplicator.cs
│ ├── IServiceHostListenerReplicator.cs
│ ├── IStatefulServiceHostDelegateInvoker.cs
│ ├── IStatelessServiceHostBuilder.cs
│ ├── IStatelessServiceHostDelegateInvoker.cs
│ ├── IServiceHostListenerReplicaTemplateConfigurator.cs
│ ├── IStatefulServiceHostDelegateReplicator.cs
│ ├── IStatelessServiceHostDelegateReplicator.cs
│ ├── IServiceHostDelegateReplicableTemplate.cs
│ ├── IServiceHostListenerReplicableTemplate.cs
│ ├── IServiceInformation.cs
│ ├── IServiceEventPayloadOnPackageModified.cs
│ ├── IStatefulServiceHostEventSourceReplicaTemplateParameters.cs
│ ├── IStatelessServiceHostEventSourceReplicaTemplateParameters.cs
│ ├── IStatefulServiceHostEventSourceReplicaTemplateConfigurator.cs
│ ├── IStatefulServiceInformation.cs
│ ├── IStatelessServiceHostEventSourceReplicaTemplateConfigurator.cs
│ ├── IStatefulServiceHostDelegateReplicableTemplate.cs
│ ├── IStatefulServiceHostEventSourceReplicator.cs
│ ├── IStatelessServiceHostDelegateReplicableTemplate.cs
│ ├── IStatelessServiceHostEventSourceReplicator.cs
│ ├── IServiceHostEventSourceReplicator.cs
│ ├── IService.cs
│ ├── IServiceHostDelegateDescriptor.cs
│ ├── IStatefulServiceHostEventSourceReplicableTemplate.cs
│ ├── IStatelessServiceHostEventSourceReplicableTemplate.cs
│ ├── ServiceHostRemotingCommunicationListenerComponentsFactory.cs
│ ├── IServiceHostEventSourceDescriptor.cs
│ ├── IStatefulServiceDelegateInvocationContextOnDataLoss.cs
│ ├── IStatefulServiceDelegateInvocationContextOnShutdown.cs
│ ├── IStatefulServiceDelegateInvocationContextOnChangeRole.cs
│ ├── IStatefulServiceHostListenerReplicator.cs
│ ├── IStatelessServiceDelegateInvocationContextOnShutdown.cs
│ ├── ServiceListenerEventSourceData.cs
│ ├── IServiceHostBuilderDelegateReplicationParameters.cs
│ ├── IServiceHostBuilderListenerReplicationParameters.cs
│ ├── IStatelessServiceHostListenerReplicator.cs
│ ├── IServiceHostBuilderEventSourceReplicationParameters.cs
│ ├── IStatefulServiceDelegateInvocationContextOnPackageAdded.cs
│ ├── IServiceHostGenericListenerReplicaTemplate.cs
│ ├── IStatefulServiceHostGenericListenerReplicaTemplateParameters.cs
│ ├── IStatefulServiceHostListenerReplicableTemplate.cs
│ ├── IStatefulServiceHostRemotingListenerReplicaTemplateParameters.cs
│ ├── IStatelessServiceDelegateInvocationContextOnPackageAdded.cs
│ ├── IStatelessServiceHostGenericListenerReplicaTemplateParameters.cs
│ ├── IServiceHostBuilderRuntimeParameters.cs
│ ├── IServiceHostRemotingListenerReplicaTemplate.cs
│ ├── IStatefulServiceDelegateInvocationContextOnPackageModified.cs
│ ├── IStatefulServiceDelegateInvocationContextOnPackageRemoved.cs
│ ├── IStatefulServiceHostDelegateReplicaTemplate.cs
│ ├── IStatefulServiceHostGenericListenerReplicaTemplateConfigurator.cs
│ ├── IStatelessServiceDelegateInvocationContextOnPackageRemoved.cs
│ ├── IStatelessServiceHostDelegateReplicaTemplate.cs
│ ├── IStatelessServiceHostListenerReplicableTemplate.cs
│ ├── IStatelessServiceHostRemotingListenerReplicaTemplateParameters.cs
│ ├── IServiceHostAspNetCoreListenerReplicaTemplate.cs
│ ├── IStatefulServiceHostAspNetCoreListenerReplicaTemplateParameters.cs
│ ├── IStatefulServiceHostRemotingListenerReplicaTemplateConfigurator.cs
│ ├── IStatelessServiceDelegateInvocationContextOnPackageModified.cs
│ ├── IStatelessServiceHostAspNetCoreListenerReplicaTemplateParameters.cs
│ ├── IStatelessServiceHostGenericListenerReplicaTemplateConfigurator.cs
│ ├── IServiceHostEventSourceReplicableTemplate.cs
│ ├── IStatefulServiceHostAspNetCoreListenerReplicaTemplateConfigurator.cs
│ ├── IStatefulServiceHostEventSourceReplicaTemplate.cs
│ ├── IStatelessServiceHostEventSourceReplicaTemplate.cs
│ ├── IStatelessServiceHostRemotingListenerReplicaTemplateConfigurator.cs
│ ├── IServiceHost.cs
│ ├── IServiceHostBuilderConfigurator.cs
│ ├── IServiceHostBuilderDelegateReplicationConfigurator.cs
│ ├── IServiceHostBuilderListenerReplicationConfigurator.cs
│ ├── IStatelessServiceHostAspNetCoreListenerReplicaTemplateConfigurator.cs
│ ├── IServiceHostDelegateInvoker.cs
│ ├── IServiceHostDelegateReplicaTemplate.cs
│ ├── IServiceHostListenerDescriptor.cs
│ ├── IServiceHostListenerReplicaTemplate.cs
│ ├── IStatefulServiceHostGenericListenerReplicaTemplate.cs
│ ├── IServiceHostBuilderEventSourceReplicationConfigurator.cs
│ ├── IServiceHostBuilderRuntimeConfigurator.cs
│ ├── IStatelessServiceHostGenericListenerReplicaTemplate.cs
│ ├── IServiceHostEventSourceReplicaTemplate.cs
│ ├── IStatefulServiceHostRemotingListenerReplicaTemplate.cs
│ ├── IServiceHostBuilder.cs
│ ├── IStatefulServiceHostAspNetCoreListenerReplicaTemplate.cs
│ ├── IStatelessServiceHostRemotingListenerReplicaTemplate.cs
│ ├── IStatelessServiceHostAspNetCoreListenerReplicaTemplate.cs
│ ├── ServiceHostGenericListenerInformation.cs
│ ├── ServiceHostRemotingListenerInformation.cs
│ ├── IServiceHostBuilderDelegateParameters.cs
│ ├── IServiceHostBuilderEventSourceParameters.cs
│ ├── StatefulServiceEventPayloadOnShutdown.cs
│ ├── IServiceHostEventSourceReplicaTemplateParameters.cs
│ ├── ServiceHostGenericCommunicationListenerFactory.cs
│ ├── StatelessServiceEventPayloadOnShutdown.cs
│ ├── IServiceHostDelegateReplicaTemplateParameters.cs
│ ├── ServiceEventPayloadOnPackageAdded.cs
│ ├── ServiceHostRemotingCommunicationListenerFactory.cs
│ ├── IServiceHostBuilderGenericListenerParameters.cs
│ ├── ServiceEventPayloadOnPackageRemoved.cs
│ ├── IServiceHostBuilderRemotingListenerParameters.cs
│ ├── IServiceHostBuilderAspNetCoreListenerParameters.cs
│ ├── IStatefulServiceHostDelegateReplicaTemplateParameters.cs
│ ├── IStatelessServiceHostDelegateReplicaTemplateParameters.cs
│ ├── IServiceHostDelegateReplicaTemplateConfigurator.cs
│ ├── StatefulServiceEventPayloadOnChangeRole.cs
│ ├── IStatefulServiceRestoreContext.cs
│ ├── IStatefulServiceHostDelegateReplicaTemplateConfigurator.cs
│ ├── ServiceHostListenerInformation.cs
│ ├── IStatelessServiceHostDelegateReplicaTemplateConfigurator.cs
│ ├── IServiceHostBuilderDelegateConfigurator.cs
│ ├── ServiceHostAspNetCoreCommunicationListenerFactory.cs
│ ├── IServiceHostEventSourceReplicaTemplateConfigurator.cs
│ ├── IServiceHostGenericListenerReplicaTemplateParameters.cs
│ ├── IServiceHostBuilderEventSourceConfigurator.cs
│ ├── StatefulServiceHostDelegateReplicator.cs
│ ├── IServiceHostBuilderGenericListenerConfigurator.cs
│ ├── IServiceHostGenericListenerReplicaTemplateConfigurator.cs
│ ├── StatelessServiceHostDelegateReplicator.cs
│ ├── IServiceHostBuilderRemotingListenerConfigurator.cs
│ ├── IServiceHostBuilderAspNetCoreListenerConfigurator.cs
│ ├── StatefulServiceEventPayloadOnDataLoss.cs
│ ├── ServiceEventPayloadOnPackageModified.cs
│ ├── StatefulServiceHostEventSourceReplicator.cs
│ ├── StatelessServiceHostEventSourceReplicator.cs
│ ├── IStatefulServiceRuntimeRegistrant.cs
│ ├── IStatelessServiceRuntimeRegistrant.cs
│ ├── IServiceHostBuilderParameters.cs
│ ├── StatefulServiceHostListenerReplicator.cs
│ ├── ServiceHostAspNetCoreListenerInformation.cs
│ ├── StatelessServiceHostListenerReplicator.cs
│ ├── ServiceHostDelegateDescriptor.cs
│ ├── ServiceHostEventSourceDescriptor.cs
│ ├── StatefulServiceEventSource.cs
│ ├── StatelessServiceEventSource.cs
│ ├── StatefulServiceDelegate.cs
│ ├── StatelessServiceDelegate.cs
│ ├── StatelessServiceLifecycleEvent.cs
│ ├── StatefulServiceDelegateInvocationContextOnDataLoss.cs
│ ├── StatefulServiceDelegateInvocationContextOnShutdown.cs
│ ├── StatelessServiceDelegateInvocationContextOnShutdown.cs
│ ├── StatefulServiceDelegateInvocationContextOnChangeRole.cs
│ ├── ServiceHostGenericListenerLogger.cs
│ ├── ServiceHostRemotingListenerLogger.cs
│ ├── IServiceHostRuntime.cs
│ ├── ServiceHostAspNetCoreListenerLogger.cs
│ ├── ServiceHostDelegateLogger.cs
│ ├── ServiceHostRemotingListenerLoggerMessageState.cs
│ ├── ServiceHostListenerDescriptor.cs
│ ├── StatefulServiceDelegateInvocationContextOnCodePackageAdded.cs
│ ├── StatefulServiceDelegateInvocationContextOnDataPackageAdded.cs
│ ├── StatelessServiceDelegateInvocationContextOnCodePackageAdded.cs
│ ├── StatelessServiceDelegateInvocationContextOnDataPackageAdded.cs
│ ├── StatefulServiceDelegateInvocationContextOnCodePackageRemoved.cs
│ ├── StatefulServiceDelegateInvocationContextOnDataPackageRemoved.cs
│ ├── StatefulServiceDelegateInvocationContextOnCodePackageModified.cs
│ ├── StatefulServiceDelegateInvocationContextOnDataPackageModified.cs
│ ├── StatefulServiceLifecycleEvent.cs
│ ├── StatelessServiceDelegateInvocationContextOnCodePackageRemoved.cs
│ ├── StatelessServiceDelegateInvocationContextOnDataPackageRemoved.cs
│ ├── StatelessServiceDelegateInvocationContextOnCodePackageModified.cs
│ ├── StatelessServiceDelegateInvocationContextOnDataPackageModified.cs
│ └── StatefulServiceDelegateInvocationContextOnConfigPackageAdded.cs
│ ├── Tools
│ ├── IConfigurableObjectLoggerParameters.cs
│ ├── IConfigurableObject.cs
│ ├── IConfigurableObjectLoggerConfigurator.cs
│ ├── IConfigurableObjectLoggerOptions.cs
│ ├── IConfigurableObjectDependenciesParameters.cs
│ └── IConfigurableObjectDependenciesConfigurator.cs
│ └── Common
│ ├── Extensions
│ ├── ReflectionQuery.cs
│ ├── ReflectionQuery.IResult.cs
│ └── EnumExtensions.cs
│ └── Exceptions
│ ├── FactoryProducesNullInstanceException.cs
│ └── ReplicatorProducesNullInstanceException.cs
├── .gitignore
├── CONTRIBUTING.md
└── azure-pipelines.yml
/samples/reacting-on-service-package-events/Service/PackageRoot/CodeNew/directory.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coherentsolutionsinc/aspnetcore-service-fabric-hosting/HEAD/favicon.png
--------------------------------------------------------------------------------
/samples/using-local-runtime/Service/PackageRoot/Data/Data-Sample.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.devcontainer/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM coherentsolutions/service-fabric-run-tests:7.2.476.1-3.1
2 |
3 | RUN apt update && apt install -y git
4 |
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/Service/PackageRoot/Data/Data.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/Service/PackageRoot/DataNew/DataNew.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/using-hierarchical-dependency-registration/Service/src/ISharedService.cs:
--------------------------------------------------------------------------------
1 | namespace Service
2 | {
3 | public interface ISharedService
4 | {
5 | string GetSharedValue();
6 | }
7 | }
--------------------------------------------------------------------------------
/samples/using-hierarchical-dependency-registration/Service/src/IPersonalService.cs:
--------------------------------------------------------------------------------
1 | namespace Service
2 | {
3 | public interface IPersonalService
4 | {
5 | string GetPersonalValue();
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/ITestDependency.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests
2 | {
3 | public interface ITestDependency
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/samples/configuring-service/App/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/using-local-runtime/App/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/App/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/App/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/TestDependency.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests
2 | {
3 | public class TestDependency : ITestDependency
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/samples/reacting-on-service-lifecycle-events/App/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/App/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessService.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessService : IService
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/samples/using-hierarchical-dependency-registration/App/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/ITestOpenGenericDependency.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests
2 | {
3 | public interface ITestOpenGenericDependency
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceEventSourceInterface.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceEventSourceInterface
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHost.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHost : IServiceHost
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHost.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHost : IServiceHost
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/TestRemotingImplementation.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests
2 | {
3 | public class TestRemotingImplementation : ITestRemotingService
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/TestOpenGenericDependency.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests
2 | {
3 | public class TestOpenGenericDependency : ITestOpenGenericDependency
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceInformation.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceInformation : IServiceInformation
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/samples/configuring-service/Service/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/samples/using-local-runtime/Service/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Proxynator/IProxynatorProxy.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Proxynator
2 | {
3 | public interface IProxynatorProxy
4 | {
5 | object Target { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/Service/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/Services/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/samples/reacting-on-service-lifecycle-events/Service/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/Service/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/DataPackageElement.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
2 | {
3 | public class DataPackageElement : PackageElement
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostListenerInformation.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostListenerInformation
4 | {
5 | string EndpointName { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/ITestRemotingService.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Services.Remoting;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests
4 | {
5 | public interface ITestRemotingService : IService
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostListenerReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostListenerReplicaTemplateParameters
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/samples/configuring-service/Service/PackageRoot/Config/Settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostGenericListenerInformation.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostGenericListenerInformation : IServiceHostListenerInformation
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostRemotingListenerInformation.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostRemotingListenerInformation : IServiceHostListenerInformation
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceEventPayloadOnShutdown.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceEventPayloadOnShutdown
4 | {
5 | bool IsAborting { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostListenerReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostListenerReplicaTemplateConfigurator
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/.devcontainer/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "C# (.NET Core) + Service Fabric",
3 | "build": {
4 | "dockerfile": "Dockerfile"
5 | },
6 |
7 | "settings": {
8 | "terminal.integrated.shell.linux": "/bin/bash"
9 | },
10 |
11 | "extensions": [
12 | "ms-dotnettools.csharp"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceEventPayloadOnShutdown.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceEventPayloadOnShutdown
4 | {
5 | bool IsAborting { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/Service/PackageRoot/Config/Settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/Services/PackageRoot/Config/Settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
--------------------------------------------------------------------------------
/samples/using-hierarchical-dependency-registration/Service/src/SharedService.cs:
--------------------------------------------------------------------------------
1 | namespace Service
2 | {
3 | public class SharedService : ISharedService
4 | {
5 | public string GetSharedValue()
6 | {
7 | return $"Hash: {this.GetHashCode()}";
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceEventPayloadOnPackageAdded.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceEventPayloadOnPackageAdded
4 | {
5 | TPackage Package { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceEventPayloadOnPackageRemoved.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceEventPayloadOnPackageRemoved
4 | {
5 | TPackage Package { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/samples/reacting-on-service-lifecycle-events/Service/PackageRoot/Config/Settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
--------------------------------------------------------------------------------
/samples/using-hierarchical-dependency-registration/Service/src/PersonalService.cs:
--------------------------------------------------------------------------------
1 | namespace Service
2 | {
3 | public class PersonalService : IPersonalService
4 | {
5 | public string GetPersonalValue()
6 | {
7 | return $"Hash: {this.GetHashCode()}";
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostListenerType.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public enum ServiceHostListenerType
4 | {
5 | AspNetCore,
6 |
7 | Remoting,
8 |
9 | Generic
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Mocks/MockServiceRemotingListenerImplementation.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Mocks
2 | {
3 | public class MockServiceRemotingListenerImplementation : IMockServiceRemotingListenerImplementation
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostListenerReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostListenerReplicaTemplateParameters
4 | {
5 | string EndpointName { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/samples/configuring-service/App/ApplicationParameters/Cloud.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/configuring-service/Service/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "Debug": {
5 | "LogLevel": {
6 | "Default": "Warning"
7 | }
8 | },
9 | "Console": {
10 | "LogLevel": {
11 | "Default": "Warning"
12 | }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/samples/using-local-runtime/App/ApplicationParameters/Cloud.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/using-local-runtime/Service/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "Debug": {
5 | "LogLevel": {
6 | "Default": "Warning"
7 | }
8 | },
9 | "Console": {
10 | "LogLevel": {
11 | "Default": "Warning"
12 | }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceDelegateInvocationContext.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceDelegateInvocationContext
4 | {
5 | StatefulServiceLifecycleEvent Event { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | syntax: glob
2 |
3 | *.suo
4 | *.user
5 | *.userosscache
6 | *.sln.docstates
7 | build.log
8 | command.log
9 | tests.log
10 |
11 | .vs/
12 | .vscode/
13 | .idea/
14 |
15 | [Bb]in/
16 | [Oo]bj/
17 | [Pp]kg/
18 | [Pp]ackages/
19 |
20 | _ReSharper*/
21 | *.[Rr]e[Ss]harper
22 | *.DotSettings.user
23 |
24 | publish/
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/Service/src/IApiServiceEventSource.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric;
2 |
3 | namespace Service
4 | {
5 | public interface IApiServiceEventSource : IServiceEventSourceInterface
6 | {
7 | void GetValueMethodInvoked();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/samples/configuring-service/App/ApplicationParameters/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/configuring-service/App/ApplicationParameters/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/using-local-runtime/App/ApplicationParameters/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/using-local-runtime/App/ApplicationParameters/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceEventPayloadOnDataLoss.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceEventPayloadOnDataLoss
4 | {
5 | IStatefulServiceRestoreContext RestoreContext { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceDelegateInvocationContext.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceDelegateInvocationContext
4 | {
5 | StatelessServiceLifecycleEvent Event { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/App/ApplicationParameters/Cloud.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/App/ApplicationParameters/Cloud.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/Services/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "Debug": {
5 | "LogLevel": {
6 | "Default": "Warning"
7 | }
8 | },
9 | "Console": {
10 | "LogLevel": {
11 | "Default": "Warning"
12 | }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseListenerEndpointTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
2 | {
3 | public interface IUseListenerEndpointTheoryExtension
4 | {
5 | string Endpoint { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulService.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Data;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IStatefulService : IService
6 | {
7 | IReliableStateManager GetReliableStateManager();
8 | }
9 | }
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/App/ApplicationParameters/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/App/ApplicationParameters/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/Service/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "Debug": {
5 | "LogLevel": {
6 | "Default": "Warning"
7 | }
8 | },
9 | "Console": {
10 | "LogLevel": {
11 | "Default": "Warning"
12 | }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/App/ApplicationParameters/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/App/ApplicationParameters/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/reacting-on-service-lifecycle-events/App/ApplicationParameters/Cloud.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/Service/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "Debug": {
5 | "LogLevel": {
6 | "Default": "Warning"
7 | }
8 | },
9 | "Console": {
10 | "LogLevel": {
11 | "Default": "Warning"
12 | }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseDelegateTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
4 | {
5 | public interface IUseDelegateTheoryExtension
6 | {
7 | Delegate Delegate { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceEventSource.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceEventSource
4 | {
5 | void WriteEvent(
6 | ref T eventData)
7 | where T : ServiceEventSourceData;
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostAspNetCoreListenerInformation.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostAspNetCoreListenerInformation : IServiceHostListenerInformation
4 | {
5 | string UrlSuffix { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceEventPayloadOnChangeRole.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IStatefulServiceEventPayloadOnChangeRole
6 | {
7 | ReplicaRole NewRole { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostBuilder.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostBuilder
4 | : IServiceHostBuilder
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostListenerReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostListenerReplicaTemplateConfigurator
4 | {
5 | void UseListenerOnSecondary();
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostListenerReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostListenerReplicaTemplateParameters
4 | {
5 | bool ListenerOnSecondary { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/samples/reacting-on-service-lifecycle-events/App/ApplicationParameters/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/reacting-on-service-lifecycle-events/App/ApplicationParameters/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/reacting-on-service-lifecycle-events/Service/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "Debug": {
5 | "LogLevel": {
6 | "Default": "Warning"
7 | }
8 | },
9 | "Console": {
10 | "LogLevel": {
11 | "Default": "Warning"
12 | }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/samples/using-hierarchical-dependency-registration/App/ApplicationParameters/Cloud.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostDelegateReplicator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostDelegateReplicator
4 | {
5 | TDelegate ReplicateFor(
6 | TService service);
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostListenerReplicator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostListenerReplicator
4 | {
5 | TListener ReplicateFor(
6 | TService service);
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostDelegateInvoker.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostDelegateInvoker
4 | : IServiceHostDelegateInvoker
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostBuilder.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostBuilder
4 | : IServiceHostBuilder
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostDelegateInvoker.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostDelegateInvoker
4 | : IServiceHostDelegateInvoker
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/samples/using-hierarchical-dependency-registration/App/ApplicationParameters/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/using-hierarchical-dependency-registration/App/ApplicationParameters/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Mocks/IMockServiceRemotingListenerImplementation.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Services.Remoting;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Mocks
4 | {
5 | public interface IMockServiceRemotingListenerImplementation : IService
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostListenerReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostListenerReplicaTemplateConfigurator
4 | {
5 | void UseEndpoint(
6 | string endpointName);
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostDelegateReplicator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostDelegateReplicator
4 | : IServiceHostDelegateReplicator
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseDelegateEventTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
2 | {
3 | public interface IUseDelegateEventTheoryExtension
4 | {
5 | TLifecycleEvent Event { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostDelegateReplicator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostDelegateReplicator
4 | : IServiceHostDelegateReplicator
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Tools/IConfigurableObjectLoggerParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools
4 | {
5 | public interface IConfigurableObjectLoggerParameters
6 | {
7 | Func LoggerOptionsFunc { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostDelegateReplicableTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostDelegateReplicableTemplate
4 | {
5 | TDelegate Activate(
6 | TService service);
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostListenerReplicableTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostListenerReplicableTemplate
4 | {
5 | TListener Activate(
6 | TService service);
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceInformation.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceInformation
6 | {
7 | ServiceContext GetContext();
8 |
9 | IServicePartition GetPartition();
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/IServiceManifestReader.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
2 | {
3 | public interface IServiceManifestReader
4 | {
5 | ServiceManifestElement Read(
6 | IServicePackage package);
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/ServiceTypeElementKind.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
2 | {
3 | public enum ServiceTypeElementKind
4 | {
5 | Invalid,
6 |
7 | Stateful,
8 |
9 | Stateless
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceEventPayloadOnPackageModified.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceEventPayloadOnPackageModified
4 | {
5 | TPackage OldPackage { get; }
6 |
7 | TPackage NewPackage { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostEventSourceReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostEventSourceReplicaTemplateParameters
4 | : IServiceHostEventSourceReplicaTemplateParameters
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostEventSourceReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostEventSourceReplicaTemplateParameters
4 | : IServiceHostEventSourceReplicaTemplateParameters
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/ActivationContexts/IPackageFactory.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.ActivationContexts
2 | {
3 | public interface IPackageFactory
4 | {
5 | TPackage Create(
6 | TElement element);
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Tools/IConfigurableObject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools
4 | {
5 | public interface IConfigurableObject
6 | {
7 | void ConfigureObject(
8 | Action configAction);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IPickListenerEndpointTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
4 | {
5 | public interface IPickListenerEndpointTheoryExtension
6 | {
7 | Action PickAction { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostEventSourceReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostEventSourceReplicaTemplateConfigurator
4 | : IServiceHostEventSourceReplicaTemplateConfigurator
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceInformation.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Data;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IStatefulServiceInformation : IServiceInformation
6 | {
7 | IReliableStateManager GetReliableStateManager();
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostEventSourceReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostEventSourceReplicaTemplateConfigurator
4 | : IServiceHostEventSourceReplicaTemplateConfigurator
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostDelegateReplicableTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostDelegateReplicableTemplate
4 | : IServiceHostDelegateReplicableTemplate
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostEventSourceReplicator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostEventSourceReplicator
4 | : IServiceHostEventSourceReplicator
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostDelegateReplicableTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostDelegateReplicableTemplate
4 | : IServiceHostDelegateReplicableTemplate
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostEventSourceReplicator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostEventSourceReplicator
4 | : IServiceHostEventSourceReplicator
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 | using Xunit;
6 |
7 | [assembly: CollectionBehavior(DisableTestParallelization = true)]
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostEventSourceReplicator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostEventSourceReplicator
4 | {
5 | TEventSource ReplicateFor(
6 | TServiceInformation serviceContext);
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IService.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IService
6 | {
7 | ServiceContext GetContext();
8 |
9 | IServicePartition GetPartition();
10 |
11 | IServiceEventSource GetEventSource();
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Tools/IConfigurableObjectLoggerConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools
4 | {
5 | public interface IConfigurableObjectLoggerConfigurator
6 | {
7 | void UseLoggerOptions(
8 | Func factoryFunc);
9 | }
10 | }
--------------------------------------------------------------------------------
/samples/configuring-service/Service/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "WebService": {
4 | "commandName": "Project",
5 | "launchBrowser": true,
6 | "launchUrl": "api/me",
7 | "environmentVariables": {
8 | "ASPNETCORE_ENVIRONMENT": "Development"
9 | },
10 | "applicationUrl": "http://localhost:50564/"
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostDelegateDescriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostDelegateDescriptor
6 | {
7 | Action> ConfigAction { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostEventSourceReplicableTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostEventSourceReplicableTemplate
4 | : IServiceHostEventSourceReplicableTemplate
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/StatelessServiceTypeElement.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
2 | {
3 | public class StatelessServiceTypeElement : ServiceTypeElement
4 | {
5 | public override ServiceTypeElementKind Kind => ServiceTypeElementKind.Stateless;
6 | }
7 | }
--------------------------------------------------------------------------------
/samples/using-local-runtime/Service/PackageRoot/Config/Settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
8 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostEventSourceReplicableTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostEventSourceReplicableTemplate
4 | : IServiceHostEventSourceReplicableTemplate
5 | {
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostRemotingCommunicationListenerComponentsFactory.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public delegate ServiceHostRemotingCommunicationListenerComponents ServiceHostRemotingCommunicationListenerComponentsFactory(
6 | ServiceContext serviceContext);
7 | }
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/Service/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "WebService": {
4 | "commandName": "Project",
5 | "launchBrowser": true,
6 | "launchUrl": "api/me",
7 | "environmentVariables": {
8 | "ASPNETCORE_ENVIRONMENT": "Development"
9 | },
10 | "applicationUrl": "http://localhost:50564/"
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/Services/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "WebService": {
4 | "commandName": "Project",
5 | "launchBrowser": true,
6 | "launchUrl": "api/me",
7 | "environmentVariables": {
8 | "ASPNETCORE_ENVIRONMENT": "Development"
9 | },
10 | "applicationUrl": "http://localhost:50564/"
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostEventSourceDescriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostEventSourceDescriptor
6 | {
7 | Action> ConfigAction { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/samples/reacting-on-service-lifecycle-events/Service/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "WebService": {
4 | "commandName": "Project",
5 | "launchBrowser": true,
6 | "launchUrl": "api/me",
7 | "environmentVariables": {
8 | "ASPNETCORE_ENVIRONMENT": "Development"
9 | },
10 | "applicationUrl": "http://localhost:50564/"
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/Service/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "WebService": {
4 | "commandName": "Project",
5 | "launchBrowser": true,
6 | "launchUrl": "api/me",
7 | "environmentVariables": {
8 | "ASPNETCORE_ENVIRONMENT": "Development"
9 | },
10 | "applicationUrl": "http://localhost:50564/"
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceDelegateInvocationContextOnDataLoss.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceDelegateInvocationContextOnDataLoss
4 | : IStatefulServiceDelegateInvocationContext
5 | {
6 | IStatefulServiceEventPayloadOnDataLoss Payload { get; }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceDelegateInvocationContextOnShutdown.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceDelegateInvocationContextOnShutdown
4 | : IStatefulServiceDelegateInvocationContext
5 | {
6 | IStatefulServiceEventPayloadOnShutdown Payload { get; }
7 | }
8 | }
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/App/ApplicationParameters/Cloud.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceDelegateInvocationContextOnChangeRole.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceDelegateInvocationContextOnChangeRole
4 | : IStatefulServiceDelegateInvocationContext
5 | {
6 | IStatefulServiceEventPayloadOnChangeRole Payload { get; }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostListenerReplicator.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Services.Communication.Runtime;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IStatefulServiceHostListenerReplicator
6 | : IServiceHostListenerReplicator
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceDelegateInvocationContextOnShutdown.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceDelegateInvocationContextOnShutdown
4 | : IStatelessServiceDelegateInvocationContext
5 | {
6 | IStatelessServiceEventPayloadOnShutdown Payload { get; }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceListenerEventSourceData.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics.Tracing;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | [EventData]
6 | public class ServiceListenerEventSourceData : ServiceEventSourceData
7 | {
8 | [EventField]
9 | public string EndpointName { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Common/Extensions/ReflectionQuery.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Common.Extensions
4 | {
5 | public static partial class ReflectionQuery
6 | {
7 | public static Root Query(
8 | this Type @this)
9 | {
10 | return new Root(@this);
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderDelegateReplicationParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderDelegateReplicationParameters
6 | {
7 | Func DelegateReplicatorFunc { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderListenerReplicationParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderListenerReplicationParameters
6 | {
7 | Func ListenerReplicatorFunc { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostListenerReplicator.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Services.Communication.Runtime;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IStatelessServiceHostListenerReplicator
6 | : IServiceHostListenerReplicator
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/samples/configuring-service/Service/src/Controllers/ApiController.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 |
3 | namespace Service.Controllers
4 | {
5 | [Route("api")]
6 | public class ApiController : Controller
7 | {
8 | [HttpGet]
9 | [Route("value")]
10 | public string GetValue()
11 | {
12 | return $"Value from {nameof(ApiController)}";
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IPickDependencyTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
5 | {
6 | public interface IPickDependencyTheoryExtension
7 | {
8 | IEnumerable> PickActions { get; }
9 | }
10 | }
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/Services/src/Controllers/StatefulController.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 |
3 | namespace Services.Controllers
4 | {
5 | [Route("api")]
6 | public class StatefulController : Controller
7 | {
8 | [HttpGet]
9 | [Route("value")]
10 | public string Get()
11 | {
12 | return $"I am Stateful Service!";
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/Services/src/Controllers/StatelessController.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 |
3 | namespace Services.Controllers
4 | {
5 | [Route("api")]
6 | public class StatelessController : Controller
7 | {
8 | [HttpGet]
9 | [Route("value")]
10 | public string Get()
11 | {
12 | return $"I am Stateless Service!";
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/Service/PackageRoot/Config/Settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
8 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseDependenciesTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.Extensions.DependencyInjection;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IUseDependenciesTheoryExtension
8 | {
9 | Func Factory { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderEventSourceReplicationParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderEventSourceReplicationParameters
6 | {
7 | Func EventSourceReplicatorFunc { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceDelegateInvocationContextOnPackageAdded.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceDelegateInvocationContextOnPackageAdded
4 | : IStatefulServiceDelegateInvocationContext
5 | {
6 | IServiceEventPayloadOnPackageAdded Payload { get; }
7 | }
8 | }
--------------------------------------------------------------------------------
/samples/using-local-runtime/Service/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "WebService": {
4 | "commandName": "Project",
5 | "launchBrowser": true,
6 | "launchUrl": "api/print",
7 | "environmentVariables": {
8 | "CS_EHSF_RUNTIME": "Local",
9 | "ASPNETCORE_ENVIRONMENT": "Development"
10 | },
11 | "applicationUrl": "http://localhost:50564/"
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostGenericListenerReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostGenericListenerReplicaTemplate
4 | : IServiceHostListenerReplicaTemplate
5 | where TConfigurator : IServiceHostGenericListenerReplicaTemplateConfigurator
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostGenericListenerReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostGenericListenerReplicaTemplateParameters
4 | : IStatefulServiceHostListenerReplicaTemplateParameters,
5 | IServiceHostGenericListenerReplicaTemplateParameters
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostListenerReplicableTemplate.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Services.Communication.Runtime;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IStatefulServiceHostListenerReplicableTemplate
6 | : IServiceHostListenerReplicableTemplate
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostRemotingListenerReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostRemotingListenerReplicaTemplateParameters
4 | : IStatefulServiceHostListenerReplicaTemplateParameters,
5 | IServiceHostRemotingListenerReplicaTemplateParameters
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceDelegateInvocationContextOnPackageAdded.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceDelegateInvocationContextOnPackageAdded
4 | : IStatelessServiceDelegateInvocationContext
5 | {
6 | IServiceEventPayloadOnPackageAdded Payload { get; }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostGenericListenerReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostGenericListenerReplicaTemplateParameters
4 | : IStatelessServiceHostListenerReplicaTemplateParameters,
5 | IServiceHostGenericListenerReplicaTemplateParameters
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/ConfigurationPackageElement.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
4 | {
5 | public class ConfigurationPackageElement : PackageElement
6 | {
7 | [XmlIgnore]
8 | public ConfigurationSettingsElement Settings { get; set; }
9 | }
10 | }
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/Service/PackageRoot/ConfigNew/SettingsNew.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
8 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IConfigureDependenciesTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.Extensions.DependencyInjection;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IConfigureDependenciesTheoryExtension
8 | {
9 | Action ConfigAction { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderRuntimeParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderRuntimeParameters
6 | where TRuntimeRegistrant : class
7 | {
8 | Func RuntimeRegistrantFunc { get; }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostRemotingListenerReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostRemotingListenerReplicaTemplate
4 | : IServiceHostListenerReplicaTemplate
5 | where TConfigurator : IServiceHostRemotingListenerReplicaTemplateConfigurator
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceDelegateInvocationContextOnPackageModified.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceDelegateInvocationContextOnPackageModified
4 | : IStatefulServiceDelegateInvocationContext
5 | {
6 | IServiceEventPayloadOnPackageModified Payload { get; }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceDelegateInvocationContextOnPackageRemoved.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceDelegateInvocationContextOnPackageRemoved
4 | : IStatefulServiceDelegateInvocationContext
5 | {
6 | IServiceEventPayloadOnPackageRemoved Payload { get; }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostDelegateReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostDelegateReplicaTemplate
4 | : IStatefulServiceHostDelegateReplicableTemplate,
5 | IServiceHostDelegateReplicaTemplate
6 |
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostGenericListenerReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostGenericListenerReplicaTemplateConfigurator
4 | : IStatefulServiceHostListenerReplicaTemplateConfigurator,
5 | IServiceHostGenericListenerReplicaTemplateConfigurator
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceDelegateInvocationContextOnPackageRemoved.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceDelegateInvocationContextOnPackageRemoved
4 | : IStatelessServiceDelegateInvocationContext
5 | {
6 | IServiceEventPayloadOnPackageRemoved Payload { get; }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostDelegateReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostDelegateReplicaTemplate
4 | : IStatelessServiceHostDelegateReplicableTemplate,
5 | IServiceHostDelegateReplicaTemplate
6 |
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostListenerReplicableTemplate.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Services.Communication.Runtime;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IStatelessServiceHostListenerReplicableTemplate
6 | : IServiceHostListenerReplicableTemplate
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostRemotingListenerReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostRemotingListenerReplicaTemplateParameters
4 | : IStatelessServiceHostListenerReplicaTemplateParameters,
5 | IServiceHostRemotingListenerReplicaTemplateParameters
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Tools/IConfigurableObjectLoggerOptions.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.Logging;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools
4 | {
5 | public interface IConfigurableObjectLoggerOptions
6 | {
7 | LogLevel LogLevel { get; }
8 |
9 | bool IncludeMetadata { get; }
10 |
11 | bool IncludeExceptionStackTrace { get; }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostAspNetCoreListenerReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostAspNetCoreListenerReplicaTemplate
4 | : IServiceHostListenerReplicaTemplate
5 | where TConfigurator : IServiceHostAspNetCoreListenerReplicaTemplateConfigurator
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostAspNetCoreListenerReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostAspNetCoreListenerReplicaTemplateParameters
4 | : IStatefulServiceHostListenerReplicaTemplateParameters,
5 | IServiceHostAspNetCoreListenerReplicaTemplateParameters
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostRemotingListenerReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostRemotingListenerReplicaTemplateConfigurator
4 | : IStatefulServiceHostListenerReplicaTemplateConfigurator,
5 | IServiceHostRemotingListenerReplicaTemplateConfigurator
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceDelegateInvocationContextOnPackageModified.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceDelegateInvocationContextOnPackageModified
4 | : IStatelessServiceDelegateInvocationContext
5 | {
6 | IServiceEventPayloadOnPackageModified Payload { get; }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostAspNetCoreListenerReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostAspNetCoreListenerReplicaTemplateParameters
4 | : IStatelessServiceHostListenerReplicaTemplateParameters,
5 | IServiceHostAspNetCoreListenerReplicaTemplateParameters
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostGenericListenerReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostGenericListenerReplicaTemplateConfigurator
4 | : IStatelessServiceHostListenerReplicaTemplateConfigurator,
5 | IServiceHostGenericListenerReplicaTemplateConfigurator
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseAspNetCoreListenerWebHostBuilderTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.AspNetCore.Hosting;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IUseAspNetCoreListenerWebHostBuilderTheoryExtension
8 | {
9 | Func Factory { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostEventSourceReplicableTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IServiceHostEventSourceReplicableTemplate
4 | where TServiceInformation : IServiceInformation
5 | {
6 | TEventSource Activate(
7 | TServiceInformation serviceContext);
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostAspNetCoreListenerReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostAspNetCoreListenerReplicaTemplateConfigurator
4 | : IStatefulServiceHostListenerReplicaTemplateConfigurator,
5 | IServiceHostAspNetCoreListenerReplicaTemplateConfigurator
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostEventSourceReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostEventSourceReplicaTemplate
4 | : IStatefulServiceHostEventSourceReplicableTemplate,
5 | IServiceHostEventSourceReplicaTemplate
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostEventSourceReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostEventSourceReplicaTemplate
4 | : IStatelessServiceHostEventSourceReplicableTemplate,
5 | IServiceHostEventSourceReplicaTemplate
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostRemotingListenerReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostRemotingListenerReplicaTemplateConfigurator
4 | : IStatelessServiceHostListenerReplicaTemplateConfigurator,
5 | IServiceHostRemotingListenerReplicaTemplateConfigurator
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IPickRemotingListenerImplementationTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.ServiceFabric.Services.Remoting;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IPickRemotingListenerImplementationTheoryExtension
8 | {
9 | Action PickAction { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHost.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using System.Threading.Tasks;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
5 | {
6 | public interface IServiceHost
7 | {
8 | Task StartAsync(
9 | CancellationToken cancellationToken);
10 |
11 | Task StopAsync(
12 | CancellationToken cancellationToken);
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderConfigurator.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderConfigurator
6 | : IConfigurableObjectDependenciesConfigurator
7 | {
8 | void UseServiceType(
9 | string serviceTypeName);
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderDelegateReplicationConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderDelegateReplicationConfigurator
6 | {
7 | void UseDelegateReplicator(
8 | Func factoryFunc);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderListenerReplicationConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderListenerReplicationConfigurator
6 | {
7 | void UseListenerReplicator(
8 | Func factoryFunc);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostAspNetCoreListenerReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostAspNetCoreListenerReplicaTemplateConfigurator
4 | : IStatelessServiceHostListenerReplicaTemplateConfigurator,
5 | IServiceHostAspNetCoreListenerReplicaTemplateConfigurator
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostDelegateInvoker.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using System.Threading.Tasks;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
5 | {
6 | public interface IServiceHostDelegateInvoker
7 | {
8 | Task InvokeAsync(
9 | TInvocationContext context,
10 | CancellationToken cancellationToken);
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostDelegateReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostDelegateReplicaTemplate : IConfigurableObject
6 | where TConfigurator : IServiceHostDelegateReplicaTemplateConfigurator
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostListenerDescriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostListenerDescriptor
6 | {
7 | ServiceHostListenerType ListenerType { get; }
8 |
9 | Action> ConfigAction { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostListenerReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostListenerReplicaTemplate : IConfigurableObject
6 | where TConfigurator : IServiceHostListenerReplicaTemplateConfigurator
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostGenericListenerReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostGenericListenerReplicaTemplate
4 | : IStatefulServiceHostListenerReplicableTemplate,
5 | IServiceHostGenericListenerReplicaTemplate
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/IServicePackage.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
4 | {
5 | public interface IServicePackage
6 | {
7 | string Path { get; }
8 |
9 | Stream GetManifestStream();
10 |
11 | Stream GetSettingsStream(
12 | string configurationPackage);
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderEventSourceReplicationConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderEventSourceReplicationConfigurator
6 | {
7 | void UseEventSourceReplicator(
8 | Func factoryFunc);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderRuntimeConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderRuntimeConfigurator
6 | where TRuntimeRegistrant : class
7 | {
8 | void UseRuntimeRegistrant(
9 | Func factoryFunc);
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostGenericListenerReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostGenericListenerReplicaTemplate
4 | : IStatelessServiceHostListenerReplicableTemplate,
5 | IServiceHostGenericListenerReplicaTemplate
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseRemotingListenerImplementationTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.ServiceFabric.Services.Remoting;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IUseRemotingListenerImplementationTheoryExtension
8 | {
9 | Func Factory { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostEventSourceReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostEventSourceReplicaTemplate : IConfigurableObject
6 | where TConfigurator : IServiceHostEventSourceReplicaTemplateConfigurator
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostRemotingListenerReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostRemotingListenerReplicaTemplate
4 | : IStatefulServiceHostListenerReplicableTemplate,
5 | IServiceHostRemotingListenerReplicaTemplate
6 |
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IPickRemotingListenerHandlerTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.ServiceFabric.Services.Remoting.V2.Runtime;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IPickRemotingListenerHandlerTheoryExtension
8 | {
9 | Action PickAction { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseGenericListenerCommunicationListenerTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
4 | {
5 | public interface IUseGenericListenerCommunicationListenerTheoryExtension
6 | {
7 | ServiceHostGenericCommunicationListenerFactory Factory { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilder.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilder : IConfigurableObject
6 | where TConfigurator : IServiceHostBuilderConfigurator
7 | {
8 | TServiceHost Build();
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostAspNetCoreListenerReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatefulServiceHostAspNetCoreListenerReplicaTemplate
4 | : IStatefulServiceHostListenerReplicableTemplate,
5 | IServiceHostAspNetCoreListenerReplicaTemplate
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostRemotingListenerReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostRemotingListenerReplicaTemplate
4 | : IStatelessServiceHostListenerReplicableTemplate,
5 | IServiceHostRemotingListenerReplicaTemplate
6 |
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseRemotingListenerCommunicationListenerTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
4 | {
5 | public interface IUseRemotingListenerCommunicationListenerTheoryExtension
6 | {
7 | ServiceHostRemotingCommunicationListenerFactory Factory { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostAspNetCoreListenerReplicaTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public interface IStatelessServiceHostAspNetCoreListenerReplicaTemplate
4 | : IStatelessServiceHostListenerReplicableTemplate,
5 | IServiceHostAspNetCoreListenerReplicaTemplate
6 |
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Mocks/MockServiceEventSource.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Mocks
4 | {
5 | public class MockServiceEventSource : IServiceEventSource
6 | {
7 | public void WriteEvent(
8 | ref T eventData)
9 | where T : ServiceEventSourceData
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseAspNetCoreListenerCommunicationListenerTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
4 | {
5 | public interface IUseAspNetCoreListenerCommunicationListenerTheoryExtension
6 | {
7 | ServiceHostAspNetCoreCommunicationListenerFactory Factory { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseEventSourceImplementationTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IUseEventSourceImplementationTheoryExtension
8 | {
9 | Func Factory { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseRemotingListenerHandlerTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.ServiceFabric.Services.Remoting.V2.Runtime;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IUseRemotingListenerHandlerTheoryExtension
8 | {
9 | Func Factory { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostGenericListenerInformation.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public class ServiceHostGenericListenerInformation : ServiceHostListenerInformation, IServiceHostGenericListenerInformation
4 | {
5 | public ServiceHostGenericListenerInformation(
6 | string endpointName)
7 | : base(endpointName)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Tools/IConfigurableObjectDependenciesParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.Extensions.DependencyInjection;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools
6 | {
7 | public interface IConfigurableObjectDependenciesParameters
8 | {
9 | Func DependenciesFunc { get; }
10 |
11 | Action DependenciesConfigAction { get; }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseRemotingListenerSettingsTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.ServiceFabric.Services.Remoting.FabricTransport.Runtime;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IUseRemotingListenerSettingsTheoryExtension
8 | {
9 | Func Factory { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostRemotingListenerInformation.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public class ServiceHostRemotingListenerInformation : ServiceHostListenerInformation, IServiceHostRemotingListenerInformation
4 | {
5 | public ServiceHostRemotingListenerInformation(
6 | string endpointName)
7 | : base(endpointName)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IPickRemotingListenerSettingsTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.ServiceFabric.Services.Remoting.FabricTransport.Runtime;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IPickRemotingListenerSettingsTheoryExtension
8 | {
9 | Action PickAction { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseRemotingListenerSerializerTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.ServiceFabric.Services.Remoting.V2;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IUseRemotingListenerSerializerTheoryExtension
8 | {
9 | Func Factory { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderDelegateParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderDelegateParameters
6 | where TReplicaTemplate : IServiceHostDelegateReplicaTemplate
7 | {
8 | Func DelegateReplicaTemplateFunc { get; }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/ServiceTypeElement.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
4 | {
5 | public abstract class ServiceTypeElement
6 | {
7 | [XmlAttribute(AttributeName = "ServiceTypeName")]
8 | public string ServiceTypeName { get; set; }
9 |
10 | public abstract ServiceTypeElementKind Kind { get; }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IPickRemotingListenerSerializationProviderTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.ServiceFabric.Services.Remoting.V2;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IPickRemotingListenerSerializationProviderTheoryExtension
8 | {
9 | Action PickAction { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/ResourcesElement.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
5 | {
6 | public class ResourcesElement
7 | {
8 | [XmlArray(ElementName = "Endpoints")]
9 | [XmlArrayItem(ElementName = "Endpoint")]
10 | public List Endpoints { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderEventSourceParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderEventSourceParameters
6 | where TReplicaTemplate : IServiceHostEventSourceReplicaTemplate
7 | {
8 | Func EventSourceReplicaTemplateFunc { get; }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/ActivationContexts/CodePackageFactory.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 | using System.Fabric.Description;
3 |
4 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations;
5 |
6 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.ActivationContexts
7 | {
8 | public class CodePackageFactory : PackageFactory
9 | {
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/ActivationContexts/DataPackageFactory.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 | using System.Fabric.Description;
3 |
4 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations;
5 |
6 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.ActivationContexts
7 | {
8 | public class DataPackageFactory : PackageFactory
9 | {
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceEventPayloadOnShutdown.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public class StatefulServiceEventPayloadOnShutdown : IStatefulServiceEventPayloadOnShutdown
4 | {
5 | public bool IsAborting { get; }
6 |
7 | public StatefulServiceEventPayloadOnShutdown(
8 | bool isAborting)
9 | {
10 | this.IsAborting = isAborting;
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostEventSourceReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
6 | {
7 | public interface IServiceHostEventSourceReplicaTemplateParameters
8 | : IConfigurableObjectDependenciesParameters
9 | {
10 | Func ImplementationFunc { get; }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostGenericCommunicationListenerFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 |
4 | using Microsoft.ServiceFabric.Services.Communication.Runtime;
5 |
6 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
7 | {
8 | public delegate ICommunicationListener ServiceHostGenericCommunicationListenerFactory(
9 | ServiceContext serviceContext,
10 | string endpointName,
11 | IServiceProvider provider);
12 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatelessServiceEventPayloadOnShutdown.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public class StatelessServiceEventPayloadOnShutdown : IStatelessServiceEventPayloadOnShutdown
4 | {
5 | public bool IsAborting { get; }
6 |
7 | public StatelessServiceEventPayloadOnShutdown(
8 | bool isAborting)
9 | {
10 | this.IsAborting = isAborting;
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/TestRemotingImplementationWithParameters.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests
2 | {
3 | public class TestRemotingImplementationWithParameters : ITestRemotingService
4 | {
5 | public ITestDependency Dependency { get; }
6 |
7 | public TestRemotingImplementationWithParameters(
8 | ITestDependency dependency)
9 | {
10 | this.Dependency = dependency;
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/IUseDelegateInvokerTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public interface IUseDelegateInvokerTheoryExtension
8 | {
9 | Func> Factory { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostDelegateReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
6 | {
7 | public interface IServiceHostDelegateReplicaTemplateParameters
8 | : IConfigurableObjectDependenciesParameters,
9 | IConfigurableObjectLoggerParameters
10 | {
11 | Delegate Delegate { get; }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/EnvironmentVariableElement.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
4 | {
5 | public class EnvironmentVariableElement
6 | {
7 | [XmlAttribute(AttributeName = "Name")]
8 | public string Name { get; set; }
9 |
10 | [XmlAttribute(AttributeName = "Value")]
11 | public string Value { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/samples/using-hierarchical-dependency-registration/Service/PackageRoot/Config/Settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceEventPayloadOnPackageAdded.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public class ServiceEventPayloadOnPackageAdded
4 | : IServiceEventPayloadOnPackageAdded
5 | {
6 | public TPackage Package { get; }
7 |
8 | public ServiceEventPayloadOnPackageAdded(
9 | TPackage package)
10 | {
11 | this.Package = package;
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostRemotingCommunicationListenerFactory.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 |
3 | using Microsoft.ServiceFabric.Services.Remoting.V2.FabricTransport.Runtime;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
6 | {
7 | public delegate FabricTransportServiceRemotingListener ServiceHostRemotingCommunicationListenerFactory(
8 | ServiceContext context,
9 | ServiceHostRemotingCommunicationListenerComponentsFactory build);
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderGenericListenerParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderGenericListenerParameters
6 | where TReplicaTemplate : IServiceHostGenericListenerReplicaTemplate
7 | {
8 | Func GenericListenerReplicaTemplateFunc { get; }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceEventPayloadOnPackageRemoved.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public class ServiceEventPayloadOnPackageRemoved
4 | : IServiceEventPayloadOnPackageRemoved
5 | {
6 | public TPackage Package { get; }
7 |
8 | public ServiceEventPayloadOnPackageRemoved(
9 | TPackage package)
10 | {
11 | this.Package = package;
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderRemotingListenerParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderRemotingListenerParameters
6 | where TReplicaTemplate : IServiceHostRemotingListenerReplicaTemplate
7 | {
8 | Func RemotingListenerReplicaTemplateFunc { get; }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/ActivationContexts/CodePackageAccessor.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 | using System.Fabric.Description;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.ActivationContexts
5 | {
6 | public class CodePackageAccessor : PackageAccessor
7 | {
8 | public CodePackageAccessor(
9 | CodePackage package)
10 | : base(package)
11 | {
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/ActivationContexts/DataPackageAccessor.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 | using System.Fabric.Description;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.ActivationContexts
5 | {
6 | public class DataPackageAccessor : PackageAccessor
7 | {
8 | public DataPackageAccessor(
9 | DataPackage package)
10 | : base(package)
11 | {
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderAspNetCoreListenerParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderAspNetCoreListenerParameters
6 | where TReplicaTemplate : IServiceHostAspNetCoreListenerReplicaTemplate
7 | {
8 | Func AspNetCoreListenerReplicaTemplateFunc { get; }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostDelegateReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IStatefulServiceHostDelegateReplicaTemplateParameters
6 | : IServiceHostDelegateReplicaTemplateParameters
7 | {
8 | StatefulServiceLifecycleEvent Event { get; }
9 |
10 | Func DelegateInvokerFunc { get; }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Tools/IConfigurableObjectDependenciesConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.Extensions.DependencyInjection;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools
6 | {
7 | public interface IConfigurableObjectDependenciesConfigurator
8 | {
9 | void UseDependencies(
10 | Func factoryFunc);
11 |
12 | void ConfigureDependencies(
13 | Action configAction);
14 | }
15 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Common/Extensions/ReflectionQuery.IResult.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Common.Extensions
4 | {
5 | public static partial class ReflectionQuery
6 | {
7 | public interface IResult
8 | {
9 | T Get();
10 | }
11 |
12 | public static Lazy GetLazy(
13 | this IResult @this)
14 | {
15 | return new Lazy(() => @this.Get());
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostDelegateReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IStatelessServiceHostDelegateReplicaTemplateParameters
6 | : IServiceHostDelegateReplicaTemplateParameters
7 | {
8 | StatelessServiceLifecycleEvent Event { get; }
9 |
10 | Func DelegateInvokerFunc { get; }
11 | }
12 | }
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/App/ApplicationParameters/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/App/ApplicationParameters/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostDelegateReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
6 | {
7 | public interface IServiceHostDelegateReplicaTemplateConfigurator
8 | : IConfigurableObjectDependenciesConfigurator,
9 | IConfigurableObjectLoggerConfigurator
10 | {
11 | void UseDelegate(
12 | Delegate @delegate);
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceEventPayloadOnChangeRole.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class StatefulServiceEventPayloadOnChangeRole : IStatefulServiceEventPayloadOnChangeRole
6 | {
7 | public ReplicaRole NewRole { get; }
8 |
9 | public StatefulServiceEventPayloadOnChangeRole(
10 | ReplicaRole newRole)
11 | {
12 | this.NewRole = newRole;
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/ActivationContexts/CodePackageDescriptionAccessor.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric.Description;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.ActivationContexts
4 | {
5 | public class CodePackageDescriptionAccessor : PackageDescriptionAccessor
6 | {
7 | public CodePackageDescriptionAccessor(
8 | CodePackageDescription packageDescription)
9 | : base(packageDescription)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/ActivationContexts/DataPackageDescriptionAccessor.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric.Description;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.ActivationContexts
4 | {
5 | public class DataPackageDescriptionAccessor : PackageDescriptionAccessor
6 | {
7 | public DataPackageDescriptionAccessor(
8 | DataPackageDescription packageDescription)
9 | : base(packageDescription)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/CodePackageElement.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
5 | {
6 | public class CodePackageElement : PackageElement
7 | {
8 | [XmlArray(ElementName = "EnvironmentVariables")]
9 | [XmlArrayItem(ElementName = "EnvironmentVariable")]
10 | public List EnvironmentVariables { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceRestoreContext.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using System.Threading.Tasks;
3 |
4 | using Microsoft.ServiceFabric.Data;
5 |
6 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
7 | {
8 | public interface IStatefulServiceRestoreContext
9 | {
10 | Task RestoreAsync(
11 | RestoreDescription restoreDescription);
12 |
13 | Task RestoreAsync(
14 | RestoreDescription restoreDescription,
15 | CancellationToken cancellationToken);
16 | }
17 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/ActivationContexts/ICodePackageActivationContextReader.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 |
3 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.ActivationContexts
6 | {
7 | public interface ICodePackageActivationContextReader
8 | {
9 | ICodePackageActivationContext Read(
10 | IServiceActivationContext activationContext,
11 | ServiceManifestElement manifest);
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/ConfigurationSectionElement.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
5 | {
6 | public class ConfigurationSectionElement
7 | {
8 | [XmlAttribute(AttributeName = "Name")]
9 | public string Name { get; set; }
10 |
11 | [XmlElement(ElementName = "Parameter")]
12 | public List Parameters { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceHostDelegateReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IStatefulServiceHostDelegateReplicaTemplateConfigurator
6 | : IServiceHostDelegateReplicaTemplateConfigurator
7 | {
8 | void UseEvent(
9 | StatefulServiceLifecycleEvent @event);
10 |
11 | void UseDelegateInvoker(
12 | Func factoryFunc);
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/PackageElement.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
4 | {
5 | public abstract class PackageElement
6 | {
7 | [XmlIgnore]
8 | public ServiceManifestElement Manifest { get; set; }
9 |
10 | [XmlAttribute(AttributeName = "Name")]
11 | public string Name { get; set; }
12 |
13 | [XmlAttribute(AttributeName = "Version")]
14 | public string Version { get; set; }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostListenerInformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public abstract class ServiceHostListenerInformation : IServiceHostListenerInformation
6 | {
7 | public string EndpointName { get; }
8 |
9 | protected ServiceHostListenerInformation(
10 | string endpointName)
11 | {
12 | this.EndpointName = endpointName
13 | ?? throw new ArgumentNullException(nameof(endpointName));
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceHostDelegateReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IStatelessServiceHostDelegateReplicaTemplateConfigurator
6 | : IServiceHostDelegateReplicaTemplateConfigurator
7 | {
8 | void UseEvent(
9 | StatelessServiceLifecycleEvent @event);
10 |
11 | void UseDelegateInvoker(
12 | Func factoryFunc);
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderDelegateConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderDelegateConfigurator
6 | where TReplicaTemplate : IServiceHostDelegateReplicaTemplate
7 | {
8 | void UseDelegateReplicaTemplate(
9 | Func factoryFunc);
10 |
11 | void DefineDelegate(
12 | Action defineAction);
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostAspNetCoreCommunicationListenerFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 |
4 | using Microsoft.AspNetCore.Hosting;
5 | using Microsoft.ServiceFabric.Services.Communication.AspNetCore;
6 |
7 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
8 | {
9 | public delegate AspNetCoreCommunicationListener ServiceHostAspNetCoreCommunicationListenerFactory(
10 | ServiceContext serviceContext,
11 | string endpointName,
12 | Func webHostFactory);
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostEventSourceReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
6 | {
7 | public interface IServiceHostEventSourceReplicaTemplateConfigurator
8 | : IConfigurableObjectDependenciesConfigurator
9 | {
10 | void UseImplementation(
11 | Func factoryFunc)
12 | where TImplementation : IServiceEventSource;
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostGenericListenerReplicaTemplateParameters.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostGenericListenerReplicaTemplateParameters
6 | : IServiceHostListenerReplicaTemplateParameters,
7 | IConfigurableObjectDependenciesParameters,
8 | IConfigurableObjectLoggerParameters
9 | {
10 | ServiceHostGenericCommunicationListenerFactory GenericCommunicationListenerFunc { get; }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/ConfigurationSettingsElement.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
5 | {
6 | [XmlRoot(ElementName = "Settings")]
7 | public class ConfigurationSettingsElement
8 | {
9 | [XmlElement(ElementName = "Name")]
10 | public string Name { get; set; }
11 |
12 | [XmlElement(ElementName = "Section")]
13 | public List Sections { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderEventSourceConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderEventSourceConfigurator
6 | where TReplicaTemplate : IServiceHostEventSourceReplicaTemplate
7 | {
8 | void UseEventSourceReplicaTemplate(
9 | Func factoryFunc);
10 |
11 | void SetupEventSource(
12 | Action setupAction);
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceHostDelegateReplicator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public class StatefulServiceHostDelegateReplicator
4 | : ServiceHostDelegateReplicator,
5 | IStatefulServiceHostDelegateReplicator
6 | {
7 | public StatefulServiceHostDelegateReplicator(
8 | IStatefulServiceHostDelegateReplicableTemplate replicaTemplate)
9 | : base(replicaTemplate)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderGenericListenerConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderGenericListenerConfigurator
6 | where TReplicaTemplate : IServiceHostGenericListenerReplicaTemplate
7 | {
8 | void UseGenericListenerReplicaTemplate(
9 | Func factoryFunc);
10 |
11 | void DefineGenericListener(
12 | Action defineAction);
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostGenericListenerReplicaTemplateConfigurator.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostGenericListenerReplicaTemplateConfigurator
6 | : IServiceHostListenerReplicaTemplateConfigurator,
7 | IConfigurableObjectDependenciesConfigurator,
8 | IConfigurableObjectLoggerConfigurator
9 | {
10 | void UseCommunicationListener(
11 | ServiceHostGenericCommunicationListenerFactory factoryFunc);
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatelessServiceHostDelegateReplicator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public class StatelessServiceHostDelegateReplicator
4 | : ServiceHostDelegateReplicator,
5 | IStatelessServiceHostDelegateReplicator
6 | {
7 | public StatelessServiceHostDelegateReplicator(
8 | IStatelessServiceHostDelegateReplicableTemplate replicaTemplate)
9 | : base(replicaTemplate)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderRemotingListenerConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderRemotingListenerConfigurator
6 | where TReplicaTemplate : IServiceHostRemotingListenerReplicaTemplate
7 | {
8 | void UseRemotingListenerReplicaTemplate(
9 | Func factoryFunc);
10 |
11 | void DefineRemotingListener(
12 | Action declareAction);
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderAspNetCoreListenerConfigurator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public interface IServiceHostBuilderAspNetCoreListenerConfigurator
6 | where TReplicaTemplate : IServiceHostAspNetCoreListenerReplicaTemplate
7 | {
8 | void UseAspNetCoreListenerReplicaTemplate(
9 | Func factoryFunc);
10 |
11 | void DefineAspNetCoreListener(
12 | Action defineAction);
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceEventPayloadOnDataLoss.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class StatefulServiceEventPayloadOnDataLoss : IStatefulServiceEventPayloadOnDataLoss
6 | {
7 | public IStatefulServiceRestoreContext RestoreContext { get; }
8 |
9 | public StatefulServiceEventPayloadOnDataLoss(
10 | IStatefulServiceRestoreContext restoreContext)
11 | {
12 | this.RestoreContext = restoreContext
13 | ?? throw new ArgumentNullException(nameof(restoreContext));
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceEventPayloadOnPackageModified.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public class ServiceEventPayloadOnPackageModified
4 | : IServiceEventPayloadOnPackageModified
5 | {
6 | public TPackage OldPackage { get; }
7 |
8 | public TPackage NewPackage { get; }
9 |
10 | public ServiceEventPayloadOnPackageModified(
11 | TPackage oldPackage,
12 | TPackage newPackage)
13 | {
14 | this.OldPackage = oldPackage;
15 | this.NewPackage = newPackage;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceHostEventSourceReplicator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public class StatefulServiceHostEventSourceReplicator
4 | : ServiceHostEventSourceReplicator,
5 | IStatefulServiceHostEventSourceReplicator
6 | {
7 | public StatefulServiceHostEventSourceReplicator(
8 | IStatefulServiceHostEventSourceReplicableTemplate replicableTemplate)
9 | : base(replicableTemplate)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatelessServiceHostEventSourceReplicator.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
2 | {
3 | public class StatelessServiceHostEventSourceReplicator
4 | : ServiceHostEventSourceReplicator,
5 | IStatelessServiceHostEventSourceReplicator
6 | {
7 | public StatelessServiceHostEventSourceReplicator(
8 | IStatelessServiceHostEventSourceReplicableTemplate replicableTemplate)
9 | : base(replicableTemplate)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/samples/configuring-service/App/PublishProfiles/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/configuring-service/App/PublishProfiles/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/using-local-runtime/App/PublishProfiles/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/using-local-runtime/App/PublishProfiles/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatefulServiceRuntimeRegistrant.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 | using System.Threading;
4 | using System.Threading.Tasks;
5 |
6 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
7 | {
8 | public interface IStatefulServiceRuntimeRegistrant
9 | {
10 | Task RegisterAsync(
11 | string serviceTypeName,
12 | Func serviceFactory,
13 | CancellationToken cancellationToken);
14 |
15 | Task UnregisterAsync(
16 | string serviceTypeName,
17 | CancellationToken cancellationToken);
18 | }
19 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/NodeContexts/NodeContextProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 | using System.Numerics;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.NodeContexts
6 | {
7 | public class NodeContextProvider
8 | {
9 | public NodeContext GetNodeContext()
10 | {
11 | return new NodeContext(
12 | Environment.MachineName,
13 | new NodeId(new BigInteger(1), new BigInteger(0)),
14 | new BigInteger(1),
15 | Environment.MachineName,
16 | Environment.MachineName);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IStatelessServiceRuntimeRegistrant.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 | using System.Threading;
4 | using System.Threading.Tasks;
5 |
6 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
7 | {
8 | public interface IStatelessServiceRuntimeRegistrant
9 | {
10 | Task RegisterAsync(
11 | string serviceTypeName,
12 | Func serviceFactory,
13 | CancellationToken cancellationToken);
14 |
15 | Task UnregisterAsync(
16 | string serviceTypeName,
17 | CancellationToken cancellationToken);
18 | }
19 | }
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/App/PublishProfiles/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/App/PublishProfiles/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostBuilderParameters.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
6 | {
7 | public interface IServiceHostBuilderParameters
8 | : IConfigurableObjectDependenciesParameters
9 | {
10 | string ServiceTypeName { get; }
11 |
12 | IServiceHostEventSourceDescriptor EventSourceDescriptor { get; }
13 |
14 | List ListenerDescriptors { get; }
15 |
16 | List DelegateDescriptors { get; }
17 | }
18 | }
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/App/PublishProfiles/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/App/PublishProfiles/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/App/PublishProfiles/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/reacting-on-service-lifecycle-events/App/PublishProfiles/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/reacting-on-service-lifecycle-events/App/PublishProfiles/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceHostListenerReplicator.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Services.Communication.Runtime;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class StatefulServiceHostListenerReplicator
6 | : ServiceHostListenerReplicator,
7 | IStatefulServiceHostListenerReplicator
8 | {
9 | public StatefulServiceHostListenerReplicator(
10 | IStatefulServiceHostListenerReplicableTemplate replicaTemplate)
11 | : base(replicaTemplate)
12 | {
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/samples/using-hierarchical-dependency-registration/App/PublishProfiles/Local.1Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/using-hierarchical-dependency-registration/App/PublishProfiles/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/UseListenerEndpointTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
2 | {
3 | public class UseListenerEndpointTheoryExtension : IUseListenerEndpointTheoryExtension
4 | {
5 | public string Endpoint { get; private set; }
6 |
7 | public UseListenerEndpointTheoryExtension()
8 | {
9 | this.Endpoint = string.Empty;
10 | }
11 |
12 | public UseListenerEndpointTheoryExtension Setup(
13 | string endpoint)
14 | {
15 | this.Endpoint = endpoint;
16 |
17 | return this;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostAspNetCoreListenerInformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class ServiceHostAspNetCoreListenerInformation : ServiceHostListenerInformation, IServiceHostAspNetCoreListenerInformation
6 | {
7 | public string UrlSuffix { get; }
8 |
9 | public ServiceHostAspNetCoreListenerInformation(
10 | string endpointName,
11 | string urlSuffix)
12 | : base(endpointName)
13 | {
14 | this.UrlSuffix = urlSuffix
15 | ?? throw new ArgumentNullException(nameof(urlSuffix));
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatelessServiceHostListenerReplicator.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Services.Communication.Runtime;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class StatelessServiceHostListenerReplicator
6 | : ServiceHostListenerReplicator,
7 | IStatelessServiceHostListenerReplicator
8 | {
9 | public StatelessServiceHostListenerReplicator(
10 | IStatelessServiceHostListenerReplicableTemplate replicaTemplate)
11 | : base(replicaTemplate)
12 | {
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Items/TheoryItemSetup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Items
4 | {
5 | [Flags]
6 | public enum TheoryItemSetup
7 | {
8 | None,
9 |
10 | AsStatefulEventSource,
11 |
12 | AsStatelessEventSource,
13 |
14 | AsStatefulDelegate,
15 |
16 | AsStatelessDelegate,
17 |
18 | AsStatefulAspNetCoreListener,
19 |
20 | AsStatelessAspNetCoreListener,
21 |
22 | AsStatefulRemotingListener,
23 |
24 | AsStatelessRemotingListener,
25 |
26 | AsStatefulGenericListener,
27 |
28 | AsStatelessGenericListener
29 | }
30 | }
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/Services/src/StatefulControllersFeature.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using Microsoft.AspNetCore.Mvc.ApplicationParts;
4 | using Microsoft.AspNetCore.Mvc.Controllers;
5 |
6 | namespace Services
7 | {
8 | public class StatefulControllersFeature : IApplicationFeatureProvider
9 | {
10 | public void PopulateFeature(IEnumerable parts, ControllerFeature feature)
11 | {
12 | for (var i = feature.Controllers.Count - 1; i >= 0; --i)
13 | {
14 | var type = feature.Controllers[i];
15 | if (!type.Name.StartsWith("Stateful")) feature.Controllers.RemoveAt(i);
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/samples/configuring-multiple-services/Services/src/StatelessControllersFeature.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using Microsoft.AspNetCore.Mvc.ApplicationParts;
4 | using Microsoft.AspNetCore.Mvc.Controllers;
5 |
6 | namespace Services
7 | {
8 | public class StatelessControllersFeature : IApplicationFeatureProvider
9 | {
10 | public void PopulateFeature(IEnumerable parts, ControllerFeature feature)
11 | {
12 | for (var i = feature.Controllers.Count - 1; i >= 0; --i)
13 | {
14 | var type = feature.Controllers[i];
15 | if (!type.Name.StartsWith("Stateless")) feature.Controllers.RemoveAt(i);
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostDelegateDescriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class ServiceHostDelegateDescriptor : IServiceHostDelegateDescriptor
6 | {
7 | public Action> ConfigAction { get; }
8 |
9 | public ServiceHostDelegateDescriptor(
10 | Action> configAction)
11 | {
12 | this.ConfigAction = configAction
13 | ?? throw new ArgumentNullException(nameof(configAction));
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostEventSourceDescriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class ServiceHostEventSourceDescriptor : IServiceHostEventSourceDescriptor
6 | {
7 | public Action> ConfigAction { get; }
8 |
9 | public ServiceHostEventSourceDescriptor(
10 | Action> configAction)
11 | {
12 | this.ConfigAction = configAction
13 | ?? throw new ArgumentNullException(nameof(configAction));
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/UseDelegateTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
4 | {
5 | public class UseDelegateTheoryExtension : IUseDelegateTheoryExtension
6 | {
7 | public Delegate Delegate { get; private set; }
8 |
9 | public UseDelegateTheoryExtension()
10 | {
11 | this.Delegate = new Action(
12 | () =>
13 | {
14 | });
15 | }
16 |
17 | public UseDelegateTheoryExtension Setup(
18 | Delegate @delegate)
19 | {
20 | this.Delegate = @delegate;
21 |
22 | return this;
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceEventSource.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class StatefulServiceEventSource
6 | {
7 | public Func CreateEventSourceFunc { get; }
8 |
9 | public StatefulServiceEventSource(
10 | Func eventSourceFunc)
11 | {
12 | if (eventSourceFunc == null)
13 | {
14 | throw new ArgumentNullException(nameof(eventSourceFunc));
15 | }
16 |
17 | var lazy = new Lazy(eventSourceFunc);
18 |
19 | this.CreateEventSourceFunc = () => lazy.Value;
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatelessServiceEventSource.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class StatelessServiceEventSource
6 | {
7 | public Func CreateEventSourceFunc { get; }
8 |
9 | public StatelessServiceEventSource(
10 | Func eventSourceFunc)
11 | {
12 | if (eventSourceFunc == null)
13 | {
14 | throw new ArgumentNullException(nameof(eventSourceFunc));
15 | }
16 |
17 | var lazy = new Lazy(eventSourceFunc);
18 |
19 | this.CreateEventSourceFunc = () => lazy.Value;
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class StatefulServiceDelegate
6 | {
7 | public StatefulServiceLifecycleEvent Event { get; }
8 |
9 | public Func CreateDelegateInvokerFunc { get; }
10 |
11 | public StatefulServiceDelegate(
12 | Func delegateInvokerFunc,
13 | StatefulServiceLifecycleEvent @event)
14 | {
15 | this.Event = @event;
16 | this.CreateDelegateInvokerFunc = delegateInvokerFunc
17 | ?? throw new ArgumentNullException(nameof(delegateInvokerFunc));
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/samples/using-hierarchical-dependency-registration/Service/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:55449/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "StatefulService": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "http://localhost:55450/"
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/Service/src/Controllers/ApiController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.AspNetCore.Mvc;
4 |
5 | namespace Service.Controllers
6 | {
7 | [Route("api")]
8 | public class ApiController : Controller
9 | {
10 | private readonly IApiServiceEventSource eventSource;
11 |
12 | public ApiController(
13 | IApiServiceEventSource eventSource)
14 | {
15 | this.eventSource = eventSource
16 | ?? throw new ArgumentNullException(nameof(eventSource));
17 | }
18 |
19 | [HttpGet]
20 | [Route("value")]
21 | public string GetValue()
22 | {
23 | this.eventSource.GetValueMethodInvoked();
24 | return $"Value from {nameof(ApiController)}";
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/samples/configuring-service/App/ApplicationPackageRoot/ApplicationManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/samples/using-local-runtime/App/ApplicationPackageRoot/ApplicationManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Common/Extensions/EnumExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Common.Extensions
5 | {
6 | public static class EnumExtensions
7 | {
8 | public static IEnumerable GetBitFlags(
9 | this T value)
10 | where T : struct, Enum
11 | {
12 | var current = 1UL;
13 | var top = Convert.ToUInt64(value);
14 | while (current <= top)
15 | {
16 | if ((top & current) > 0)
17 | {
18 | yield return (T) Enum.ToObject(typeof(T), current);
19 | }
20 |
21 | current <<= 1;
22 | }
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatelessServiceDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class StatelessServiceDelegate
6 | {
7 | public StatelessServiceLifecycleEvent Event { get; }
8 |
9 | public Func CreateDelegateInvokerFunc { get; }
10 |
11 | public StatelessServiceDelegate(
12 | Func delegateInvokerFunc,
13 | StatelessServiceLifecycleEvent @event)
14 | {
15 | this.Event = @event;
16 | this.CreateDelegateInvokerFunc = delegateInvokerFunc
17 | ?? throw new ArgumentNullException(nameof(delegateInvokerFunc));
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/EndpointElement.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
4 | {
5 | public class EndpointElement
6 | {
7 | [XmlAttribute(AttributeName = "Name")]
8 | public string Name { get; set; }
9 |
10 | [XmlAttribute(AttributeName = "Protocol")]
11 | public string Protocol { get; set; }
12 |
13 | [XmlAttribute(AttributeName = "Port")]
14 | public string Port { get; set; }
15 |
16 | [XmlAttribute(AttributeName = "Type")]
17 | public string Type { get; set; }
18 |
19 | [XmlAttribute(AttributeName = "CodePackageRef")]
20 | public string CodePackageRef { get; set; }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatelessServiceLifecycleEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | [Flags]
6 | public enum StatelessServiceLifecycleEvent
7 | {
8 | OnStartup = 1,
9 |
10 | OnRun = 1 << 1,
11 |
12 | OnShutdown = 1 << 2,
13 |
14 | OnCodePackageAdded = 1 << 3,
15 |
16 | OnCodePackageModified = 1 << 4,
17 |
18 | OnCodePackageRemoved = 1 << 5,
19 |
20 | OnConfigPackageAdded = 1 << 6,
21 |
22 | OnConfigPackageModified = 1 << 7,
23 |
24 | OnConfigPackageRemoved = 1 << 8,
25 |
26 | OnDataPackageAdded = 1 << 9,
27 |
28 | OnDataPackageModified = 1 << 10,
29 |
30 | OnDataPackageRemoved = 1 << 11
31 | }
32 | }
--------------------------------------------------------------------------------
/samples/configuring-custom-event-source/App/ApplicationPackageRoot/ApplicationManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/UseDependenciesTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.Extensions.DependencyInjection;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public class UseDependenciesTheoryExtension : IUseDependenciesTheoryExtension
8 | {
9 | public Func Factory { get; private set; }
10 |
11 | public UseDependenciesTheoryExtension()
12 | {
13 | this.Factory = () => new ServiceCollection();
14 | }
15 |
16 | public UseDependenciesTheoryExtension Setup(
17 | Func factory)
18 | {
19 | this.Factory = factory;
20 |
21 | return this;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/PickListenerEndpointTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
4 | {
5 | public class PickListenerEndpointTheoryExtension : IPickListenerEndpointTheoryExtension
6 | {
7 | public Action PickAction { get; private set; }
8 |
9 | public PickListenerEndpointTheoryExtension()
10 | {
11 | this.PickAction = s =>
12 | {
13 | };
14 | }
15 |
16 | public PickListenerEndpointTheoryExtension Setup(
17 | Action action)
18 | {
19 | this.PickAction = action ?? throw new ArgumentNullException(nameof(action));
20 |
21 | return this;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceDelegateInvocationContextOnDataLoss.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class StatefulServiceDelegateInvocationContextOnDataLoss
6 | : StatefulServiceDelegateInvocationContext,
7 | IStatefulServiceDelegateInvocationContextOnDataLoss
8 | {
9 | public StatefulServiceDelegateInvocationContextOnDataLoss(
10 | IStatefulServiceEventPayloadOnDataLoss payload)
11 | : base(StatefulServiceLifecycleEvent.OnDataLoss, payload)
12 | {
13 | if (payload == null)
14 | {
15 | throw new ArgumentNullException(nameof(payload));
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceDelegateInvocationContextOnShutdown.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class StatefulServiceDelegateInvocationContextOnShutdown
6 | : StatefulServiceDelegateInvocationContext,
7 | IStatefulServiceDelegateInvocationContextOnShutdown
8 | {
9 | public StatefulServiceDelegateInvocationContextOnShutdown(
10 | IStatefulServiceEventPayloadOnShutdown payload)
11 | : base(StatefulServiceLifecycleEvent.OnShutdown, payload)
12 | {
13 | if (payload == null)
14 | {
15 | throw new ArgumentNullException(nameof(payload));
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Mocks/MockGenericCommunicationListener.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 | using System.Threading.Tasks;
4 |
5 | using Microsoft.ServiceFabric.Services.Communication.Runtime;
6 |
7 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Mocks
8 | {
9 | public class MockGenericCommunicationListener : ICommunicationListener
10 | {
11 | public void Abort()
12 | {
13 | }
14 |
15 | public Task OpenAsync(
16 | CancellationToken cancellationToken)
17 | {
18 | return Task.FromResult(String.Empty);
19 | }
20 |
21 | public Task CloseAsync(
22 | CancellationToken cancellationToken)
23 | {
24 | return Task.CompletedTask;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatelessServiceDelegateInvocationContextOnShutdown.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class StatelessServiceDelegateInvocationContextOnShutdown
6 | : StatelessServiceDelegateInvocationContext,
7 | IStatelessServiceDelegateInvocationContextOnShutdown
8 | {
9 | public StatelessServiceDelegateInvocationContextOnShutdown(
10 | IStatelessServiceEventPayloadOnShutdown payload)
11 | : base(StatelessServiceLifecycleEvent.OnShutdown, payload)
12 | {
13 | if (payload == null)
14 | {
15 | throw new ArgumentNullException(nameof(payload));
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/ConfigurationParameterElement.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
4 | {
5 | public class ConfigurationParameterElement
6 | {
7 | [XmlAttribute(AttributeName = "Name")]
8 | public string Name { get; set; }
9 |
10 | [XmlAttribute(AttributeName = "Value")]
11 | public string Value { get; set; }
12 |
13 | [XmlAttribute(AttributeName = "MustOverride")]
14 | public bool MustOverride { get; set; }
15 |
16 | [XmlAttribute(AttributeName = "IsEncrypted")]
17 | public bool IsEncrypted { get; set; }
18 |
19 | [XmlAttribute(AttributeName = "Type")]
20 | public string Type { get; set; }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceDelegateInvocationContextOnChangeRole.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class StatefulServiceDelegateInvocationContextOnChangeRole
6 | : StatefulServiceDelegateInvocationContext,
7 | IStatefulServiceDelegateInvocationContextOnChangeRole
8 | {
9 | public StatefulServiceDelegateInvocationContextOnChangeRole(
10 | IStatefulServiceEventPayloadOnChangeRole payload)
11 | : base(StatefulServiceLifecycleEvent.OnChangeRole, payload)
12 | {
13 | if (payload == null)
14 | {
15 | throw new ArgumentNullException(nameof(payload));
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostGenericListenerLogger.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 |
3 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
6 | {
7 | public class ServiceHostGenericListenerLogger : ServiceHostListenerLogger
8 | {
9 | public ServiceHostGenericListenerLogger(
10 | IServiceHostGenericListenerInformation listenerInformation,
11 | ServiceContext serviceContext,
12 | IServiceEventSource eventSource,
13 | string eventCategoryName,
14 | IConfigurableObjectLoggerOptions options)
15 | : base(listenerInformation, serviceContext, eventSource, eventCategoryName, options)
16 | {
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # CONTRIBUTING
2 |
3 | The project is created using Visual Studio 2017. You are encouraged to use Visual Studio too but it isn't prohibited to use any IDE you like.
4 |
5 | ## Preparing the development machine
6 |
7 | * Install Git: https://git-scm.com/
8 | * Install .NET Core SDK: https://www.microsoft.com/net/download/windows
9 |
10 | ## Set up the development environment
11 |
12 | * Clone the master branch. `git clone https://github.com/coherentsolutionsinc/aspnetcore-service-fabric-hosting/ `
13 | * Build & Run Tests. `build-and-test.ps1`
14 |
15 | ## Questions and Issues
16 |
17 | Have a question? - [Ask][1]!
18 |
19 | An idea? - [Request][1]!
20 |
21 | Found an issue? - [Report][1]!
22 |
23 | [1]: https://github.com/coherentsolutionsinc/aspnetcore-service-fabric-hosting/issues "Ask a question or report an issue"
24 |
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostRemotingListenerLogger.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 |
3 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
6 | {
7 | public class ServiceHostRemotingListenerLogger : ServiceHostListenerLogger
8 | {
9 | public ServiceHostRemotingListenerLogger(
10 | IServiceHostRemotingListenerInformation listenerInformation,
11 | ServiceContext serviceContext,
12 | IServiceEventSource eventSource,
13 | string eventCategoryName,
14 | IConfigurableObjectLoggerOptions options)
15 | : base(listenerInformation, serviceContext, eventSource, eventCategoryName, options)
16 | {
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/IServiceHostRuntime.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 | using System.Threading;
4 | using System.Threading.Tasks;
5 |
6 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
7 | {
8 | public interface IServiceHostRuntime
9 | {
10 | Task RegisterServiceAsync(
11 | string serviceTypeName,
12 | Func serviceFactory,
13 | TimeSpan timeout = default,
14 | CancellationToken cancellationToken = default);
15 |
16 | Task RegisterServiceAsync(
17 | string serviceTypeName,
18 | Func serviceFactory,
19 | TimeSpan timeout = default,
20 | CancellationToken cancellationToken = default);
21 | }
22 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostAspNetCoreListenerLogger.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 |
3 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
6 | {
7 | public class ServiceHostAspNetCoreListenerLogger : ServiceHostListenerLogger
8 | {
9 | public ServiceHostAspNetCoreListenerLogger(
10 | IServiceHostAspNetCoreListenerInformation listenerInformation,
11 | ServiceContext serviceContext,
12 | IServiceEventSource eventSource,
13 | string eventCategoryName,
14 | IConfigurableObjectLoggerOptions options)
15 | : base(listenerInformation, serviceContext, eventSource, eventCategoryName, options)
16 | {
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/samples/reacting-on-service-package-events/App/PublishProfiles/Local.5Node.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/azure-pipelines.yml:
--------------------------------------------------------------------------------
1 | # Starter pipeline
2 | # Start with a minimal pipeline that you can customize to build and deploy your code.
3 | # Add steps that build, run tests, deploy, and more:
4 | # https://aka.ms/yaml
5 |
6 | trigger:
7 | - master
8 |
9 | pool:
10 | vmImage: 'ubuntu-18.04'
11 |
12 | container: coherentsolutions/service-fabric-run-tests:7.2.476.1-3.1
13 |
14 | steps:
15 | - task: DotNetCoreCLI@2
16 | inputs:
17 | command: 'restore'
18 | projects: 'src/Code.sln'
19 | feedsToUse: 'select'
20 | displayName: 'Restore'
21 | - task: DotNetCoreCLI@2
22 | inputs:
23 | command: 'build'
24 | projects: 'src/Code.sln'
25 | arguments: '-c Release --no-restore'
26 | displayName: 'Build'
27 | - task: DotNetCoreCLI@2
28 | inputs:
29 | command: 'test'
30 | projects: 'src/Code.sln'
31 | arguments: '-c Test --no-build --no-restore'
32 | displayName: 'Test'
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/UseStatefulDelegateEventTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
4 | {
5 | public class UseStatefulDelegateEventTheoryExtension : IUseDelegateEventTheoryExtension
6 | {
7 | public StatefulServiceLifecycleEvent Event { get; private set; }
8 |
9 | public UseStatefulDelegateEventTheoryExtension()
10 | {
11 | this.Event = StatefulServiceLifecycleEvent.OnRun;
12 | }
13 |
14 | public UseStatefulDelegateEventTheoryExtension Setup(
15 | StatefulServiceLifecycleEvent @event)
16 | {
17 | this.Event = @event;
18 |
19 | return this;
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostDelegateLogger.cs:
--------------------------------------------------------------------------------
1 | using System.Fabric;
2 |
3 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Tools;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
6 | {
7 | public class ServiceHostDelegateLogger : ServiceHostLogger
8 | {
9 | public ServiceHostDelegateLogger(
10 | ServiceContext serviceContext,
11 | IServiceEventSource eventSource,
12 | string eventCategoryName,
13 | IConfigurableObjectLoggerOptions options)
14 | : base(serviceContext, eventSource, eventCategoryName, options)
15 | {
16 | }
17 |
18 | protected override void FillEventData(
19 | TState state,
20 | ServiceEventSourceData eventData)
21 | {
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/UseStatelessDelegateEventTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
4 | {
5 | public class UseStatelessDelegateEventTheoryExtension : IUseDelegateEventTheoryExtension
6 | {
7 | public StatelessServiceLifecycleEvent Event { get; private set; }
8 |
9 | public UseStatelessDelegateEventTheoryExtension()
10 | {
11 | this.Event = StatelessServiceLifecycleEvent.OnRun;
12 | }
13 |
14 | public UseStatelessDelegateEventTheoryExtension Setup(
15 | StatelessServiceLifecycleEvent @event)
16 | {
17 | this.Event = @event;
18 |
19 | return this;
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Theories/Extensions/ConfigureDependenciesTheoryExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.Extensions.DependencyInjection;
4 |
5 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Theories.Extensions
6 | {
7 | public class ConfigureDependenciesTheoryExtension : IConfigureDependenciesTheoryExtension
8 | {
9 | public Action ConfigAction { get; private set; }
10 |
11 | public ConfigureDependenciesTheoryExtension()
12 | {
13 | this.ConfigAction = services =>
14 | {
15 | };
16 | }
17 |
18 | public ConfigureDependenciesTheoryExtension Setup(
19 | Action configAction)
20 | {
21 | this.ConfigAction = configAction;
22 |
23 | return this;
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Mocks/MockServiceRemotingRequestMessageBodySerializer.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Services.Remoting.V2;
2 | using Microsoft.ServiceFabric.Services.Remoting.V2.Messaging;
3 |
4 | using ServiceFabric.Mocks.RemotingV2;
5 |
6 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Mocks
7 | {
8 | public class MockServiceRemotingRequestMessageBodySerializer : IServiceRemotingRequestMessageBodySerializer
9 | {
10 | public IOutgoingMessageBody Serialize(
11 | IServiceRemotingRequestMessageBody serviceRemotingRequestMessageBody)
12 | {
13 | return null;
14 | }
15 |
16 | public IServiceRemotingRequestMessageBody Deserialize(
17 | IIncomingMessageBody messageBody)
18 | {
19 | return new MockServiceRemotingRequestMessageBody();
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests/src/Mocks/MockServiceRemotingResponseMessageBodySerializer.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Services.Remoting.V2;
2 | using Microsoft.ServiceFabric.Services.Remoting.V2.Messaging;
3 |
4 | using ServiceFabric.Mocks.RemotingV2;
5 |
6 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Tests.Mocks
7 | {
8 | public class MockServiceRemotingResponseMessageBodySerializer : IServiceRemotingResponseMessageBodySerializer
9 | {
10 | public IOutgoingMessageBody Serialize(
11 | IServiceRemotingResponseMessageBody serviceRemotingResponseMessageBody)
12 | {
13 | return null;
14 | }
15 |
16 | public IServiceRemotingResponseMessageBody Deserialize(
17 | IIncomingMessageBody messageBody)
18 | {
19 | return new MockServiceRemotingResponseMessageBody();
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Common/Exceptions/FactoryProducesNullInstanceException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.Serialization;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Common.Exceptions
5 | {
6 | public class FactoryProducesNullInstanceException : Exception
7 | {
8 | public FactoryProducesNullInstanceException()
9 | : this(null)
10 | {
11 | }
12 |
13 | public FactoryProducesNullInstanceException(
14 | Exception innerException)
15 | : base($"The instance of {nameof(T)} produced by factory cannot be null", innerException)
16 | {
17 | }
18 |
19 | protected FactoryProducesNullInstanceException(
20 | SerializationInfo info,
21 | StreamingContext context)
22 | : base(info, context)
23 | {
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostRemotingListenerLoggerMessageState.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ServiceFabric.Services.Remoting.V2;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class ServiceHostRemotingListenerLoggerMessageState
6 | {
7 | private readonly int methodId;
8 |
9 | private readonly int interfaceId;
10 |
11 | public ServiceHostRemotingListenerLoggerMessageState(
12 | IServiceRemotingRequestMessage requestMessage)
13 | {
14 | var headers = requestMessage.GetHeader();
15 |
16 | this.methodId = headers.MethodId;
17 | this.interfaceId = headers.InterfaceId;
18 | }
19 |
20 | public override string ToString()
21 | {
22 | return $"InterfaceId: {this.interfaceId} MethodId: {this.methodId}";
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/ServiceHostListenerDescriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
4 | {
5 | public class ServiceHostListenerDescriptor : IServiceHostListenerDescriptor
6 | {
7 | public ServiceHostListenerType ListenerType { get; }
8 |
9 | public Action> ConfigAction { get; }
10 |
11 | public ServiceHostListenerDescriptor(
12 | ServiceHostListenerType listenerType,
13 | Action> configAction)
14 | {
15 | this.ListenerType = listenerType;
16 | this.ConfigAction = configAction
17 | ?? throw new ArgumentNullException(nameof(configAction));
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceDelegateInvocationContextOnCodePackageAdded.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
5 | {
6 | public class StatefulServiceDelegateInvocationContextOnCodePackageAdded
7 | : StatefulServiceDelegateInvocationContext>,
8 | IStatefulServiceDelegateInvocationContextOnPackageAdded
9 | {
10 | public StatefulServiceDelegateInvocationContextOnCodePackageAdded(
11 | IServiceEventPayloadOnPackageAdded payload)
12 | : base(StatefulServiceLifecycleEvent.OnCodePackageAdded, payload)
13 | {
14 | if (payload == null)
15 | {
16 | throw new ArgumentNullException(nameof(payload));
17 | }
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceDelegateInvocationContextOnDataPackageAdded.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
5 | {
6 | public class StatefulServiceDelegateInvocationContextOnDataPackageAdded
7 | : StatefulServiceDelegateInvocationContext>,
8 | IStatefulServiceDelegateInvocationContextOnPackageAdded
9 | {
10 | public StatefulServiceDelegateInvocationContextOnDataPackageAdded(
11 | IServiceEventPayloadOnPackageAdded payload)
12 | : base(StatefulServiceLifecycleEvent.OnDataPackageAdded, payload)
13 | {
14 | if (payload == null)
15 | {
16 | throw new ArgumentNullException(nameof(payload));
17 | }
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Common/Exceptions/ReplicatorProducesNullInstanceException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.Serialization;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Common.Exceptions
5 | {
6 | public class ReplicatorProducesNullInstanceException : Exception
7 | {
8 | public ReplicatorProducesNullInstanceException()
9 | : this(null)
10 | {
11 | }
12 |
13 | public ReplicatorProducesNullInstanceException(
14 | Exception innerException)
15 | : base($"The instance of {nameof(T)} produced by replicator cannot be null", innerException)
16 | {
17 | }
18 |
19 | protected ReplicatorProducesNullInstanceException(
20 | SerializationInfo info,
21 | StreamingContext context)
22 | : base(info, context)
23 | {
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatelessServiceDelegateInvocationContextOnCodePackageAdded.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
5 | {
6 | public class StatelessServiceDelegateInvocationContextOnCodePackageAdded
7 | : StatelessServiceDelegateInvocationContext>,
8 | IStatelessServiceDelegateInvocationContextOnPackageAdded
9 | {
10 | public StatelessServiceDelegateInvocationContextOnCodePackageAdded(
11 | IServiceEventPayloadOnPackageAdded payload)
12 | : base(StatelessServiceLifecycleEvent.OnCodePackageAdded, payload)
13 | {
14 | if (payload == null)
15 | {
16 | throw new ArgumentNullException(nameof(payload));
17 | }
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatelessServiceDelegateInvocationContextOnDataPackageAdded.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
5 | {
6 | public class StatelessServiceDelegateInvocationContextOnDataPackageAdded
7 | : StatelessServiceDelegateInvocationContext>,
8 | IStatelessServiceDelegateInvocationContextOnPackageAdded
9 | {
10 | public StatelessServiceDelegateInvocationContextOnDataPackageAdded(
11 | IServiceEventPayloadOnPackageAdded payload)
12 | : base(StatelessServiceLifecycleEvent.OnDataPackageAdded, payload)
13 | {
14 | if (payload == null)
15 | {
16 | throw new ArgumentNullException(nameof(payload));
17 | }
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceDelegateInvocationContextOnCodePackageRemoved.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
5 | {
6 | public class StatefulServiceDelegateInvocationContextOnCodePackageRemoved
7 | : StatefulServiceDelegateInvocationContext>,
8 | IStatefulServiceDelegateInvocationContextOnPackageRemoved
9 | {
10 | public StatefulServiceDelegateInvocationContextOnCodePackageRemoved(
11 | IServiceEventPayloadOnPackageRemoved payload)
12 | : base(StatefulServiceLifecycleEvent.OnCodePackageRemoved, payload)
13 | {
14 | if (payload == null)
15 | {
16 | throw new ArgumentNullException(nameof(payload));
17 | }
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceDelegateInvocationContextOnDataPackageRemoved.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
5 | {
6 | public class StatefulServiceDelegateInvocationContextOnDataPackageRemoved
7 | : StatefulServiceDelegateInvocationContext>,
8 | IStatefulServiceDelegateInvocationContextOnPackageRemoved
9 | {
10 | public StatefulServiceDelegateInvocationContextOnDataPackageRemoved(
11 | IServiceEventPayloadOnPackageRemoved payload)
12 | : base(StatefulServiceLifecycleEvent.OnDataPackageRemoved, payload)
13 | {
14 | if (payload == null)
15 | {
16 | throw new ArgumentNullException(nameof(payload));
17 | }
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/Runtime/Configurations/ServiceManifestProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric.Runtime.Configurations
4 | {
5 | public class ServiceManifestProvider
6 | {
7 | private readonly IServicePackage package;
8 |
9 | private readonly IServiceManifestReader manifestReader;
10 |
11 | public ServiceManifestProvider(
12 | IServicePackage package,
13 | IServiceManifestReader manifestReader)
14 | {
15 | this.package = package ?? throw new ArgumentNullException(nameof(package));
16 | this.manifestReader = manifestReader ?? throw new ArgumentNullException(nameof(manifestReader));
17 | }
18 |
19 | public ServiceManifestElement GetManifest()
20 | {
21 | return this.manifestReader.Read(this.package);
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceDelegateInvocationContextOnCodePackageModified.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
5 | {
6 | public class StatefulServiceDelegateInvocationContextOnCodePackageModified
7 | : StatefulServiceDelegateInvocationContext>,
8 | IStatefulServiceDelegateInvocationContextOnPackageModified
9 | {
10 | public StatefulServiceDelegateInvocationContextOnCodePackageModified(
11 | IServiceEventPayloadOnPackageModified payload)
12 | : base(StatefulServiceLifecycleEvent.OnCodePackageModified, payload)
13 | {
14 | if (payload == null)
15 | {
16 | throw new ArgumentNullException(nameof(payload));
17 | }
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/CoherentSolutions.Extensions.Hosting.ServiceFabric/src/Fabric/StatefulServiceDelegateInvocationContextOnDataPackageModified.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Fabric;
3 |
4 | namespace CoherentSolutions.Extensions.Hosting.ServiceFabric.Fabric
5 | {
6 | public class StatefulServiceDelegateInvocationContextOnDataPackageModified
7 | : StatefulServiceDelegateInvocationContext>,
8 | IStatefulServiceDelegateInvocationContextOnPackageModified
9 | {
10 | public StatefulServiceDelegateInvocationContextOnDataPackageModified(
11 | IServiceEventPayloadOnPackageModified