20 |
--------------------------------------------------------------------------------
/Src/Test/Test.Xigadee.Api.Server/Areas/HelpPage/Views/Shared/_Layout.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | @ViewBag.Title
7 | @RenderSection("scripts", required: false)
8 |
9 |
10 | @RenderBody()
11 |
12 |
--------------------------------------------------------------------------------
/Src/Test/Test.Xigadee.Api.Server/Areas/HelpPage/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | // Change the Layout path below to blend the look and feel of the help page with your existing web pages.
3 | Layout = "~/Areas/HelpPage/Views/Shared/_Layout.cshtml";
4 | }
--------------------------------------------------------------------------------
/Src/Test/Test.Xigadee.Api.Server/Test.Xigadee.Api.Server.licenseheader:
--------------------------------------------------------------------------------
1 | extensions: designer.cs generated.cs
2 | extensions: .cs
3 | #region Copyright
4 | // Copyright Hitachi Consulting
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | //
10 | // http://www.apache.org/licenses/LICENSE-2.0
11 | //
12 | // Unless required by applicable law or agreed to in writing, software
13 | // distributed under the License is distributed on an "AS IS" BASIS,
14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | // See the License for the specific language governing permissions and
16 | // limitations under the License.
17 | #endregion
18 |
--------------------------------------------------------------------------------
/Src/Test/Test.Xigadee.Api.Web/Content/Site.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 50px;
3 | padding-bottom: 20px;
4 | }
5 |
6 | /* Set padding to keep content from hitting the edges */
7 | .body-content {
8 | padding-left: 15px;
9 | padding-right: 15px;
10 | }
11 |
12 | /* Override the default bootstrap behavior where horizontal description lists
13 | will truncate terms that are too long to fit in the left column
14 | */
15 | .dl-horizontal dt {
16 | white-space: normal;
17 | }
18 |
19 | /* Set width on the form input elements since they're 100% wide by default */
20 | input,
21 | select,
22 | textarea {
23 | max-width: 280px;
24 | }
25 |
--------------------------------------------------------------------------------
/Src/Test/Test.Xigadee.Api.Web/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Test.Xigadee.Api.Web.MvcApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/Src/Test/Test.Xigadee.Api.Web/Scripts/_references.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xigadee/Microservice/95ad3e0726094355c32fcc14c4d466a35a9e812f/Src/Test/Test.Xigadee.Api.Web/Scripts/_references.js
--------------------------------------------------------------------------------
/Src/Test/Test.Xigadee.Api.Web/Test.Xigadee.Api.Web.licenseheader:
--------------------------------------------------------------------------------
1 | extensions: designer.cs generated.cs
2 | extensions: .cs
3 | #region Copyright
4 | // Copyright Hitachi Consulting
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | //
10 | // http://www.apache.org/licenses/LICENSE-2.0
11 | //
12 | // Unless required by applicable law or agreed to in writing, software
13 | // distributed under the License is distributed on an "AS IS" BASIS,
14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | // See the License for the specific language governing permissions and
16 | // limitations under the License.
17 | #endregion
18 |
--------------------------------------------------------------------------------
/Src/Test/Test.Xigadee.Api.Web/Views/Account/ConfirmEmail.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Confirm Email";
3 | }
4 |
5 |
@ViewBag.Title.
6 |
7 |
8 | Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
9 |
10 | Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
11 |
17 |
--------------------------------------------------------------------------------
/Src/Test/Test.Xigadee.Shared/Test.Xigadee.Shared.licenseheader:
--------------------------------------------------------------------------------
1 | extensions: designer.cs generated.cs
2 | extensions: .cs
3 | #region Copyright
4 | // Copyright Hitachi Consulting
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | //
10 | // http://www.apache.org/licenses/LICENSE-2.0
11 | //
12 | // Unless required by applicable law or agreed to in writing, software
13 | // distributed under the License is distributed on an "AS IS" BASIS,
14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | // See the License for the specific language governing permissions and
16 | // limitations under the License.
17 | #endregion
18 |
--------------------------------------------------------------------------------
/Src/Test/Test.Xigadee.Shared/Tests/PersistenceTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Test.Xigadee.Tests
8 | {
9 | public static class PersistenceTests
10 | {
11 |
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Src/Test/Test.Xigadee.Shared/Xsd/Blah.xsd:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/Src/Test/Test.Xigadee.Shared/_docs/ReadMe.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 |
9 |
10 | # Test.Xigadee.Shared
11 |
12 | This project contains a set of shared classes that can be used across all the testing projects.
13 |
14 |
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Api.Server/Controllers/ApiPersistenceOData4ControllerAsync.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee.Controllers
8 | {
9 | public class ApiPersistenceOData4ControllerAsync
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Api.Server/Owin/AllowNoClientCertificateAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xigadee
4 | {
5 | ///
6 | /// Indicates that request without a client certificate can be made - allows certain actions
7 | /// to not pass a client certificate when it has been globally specified
8 | ///
9 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
10 | public sealed class AllowNoClientCertificateAttribute : Attribute
11 | {
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Api.Server/Owin/Policy/IJwtTokenVerificationPolicy.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | ///
4 | /// This interface is used by classes that verify the token.
5 | ///
6 | public interface IJwtTokenVerificationPolicy
7 | {
8 | ///
9 | /// This method validates the tokenParameter and returns the token.
10 | ///
11 | /// The token string parameter.
12 | ///
13 | JwtToken Validate(string tokenParameter);
14 | ///
15 | /// This property specifies whether the filter should deny access by default.
16 | ///
17 | bool DenyByDefault { get; set; }
18 | }
19 | }
--------------------------------------------------------------------------------
/Src/Xigadee.Api.Server/Pipeline/Interfaces/IPipelineWebApi.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Web.Http;
7 |
8 | namespace Xigadee
9 | {
10 | public interface IPipelineWebApi:IPipeline
11 | {
12 | HttpConfiguration HttpConfig { get; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Src/Xigadee.Api.Server/Xigadee.Api.Server.licenseheader:
--------------------------------------------------------------------------------
1 | extensions: designer.cs generated.cs
2 | extensions: .cs
3 | #region Copyright
4 | // Copyright Hitachi Consulting
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | //
10 | // http://www.apache.org/licenses/LICENSE-2.0
11 | //
12 | // Unless required by applicable law or agreed to in writing, software
13 | // distributed under the License is distributed on an "AS IS" BASIS,
14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | // See the License for the specific language governing permissions and
16 | // limitations under the License.
17 | #endregion
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Api/Xigadee.Api.licenseheader:
--------------------------------------------------------------------------------
1 | extensions: designer.cs generated.cs
2 | extensions: .cs
3 | #region Copyright
4 | // Copyright Hitachi Consulting
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | //
10 | // http://www.apache.org/licenses/LICENSE-2.0
11 | //
12 | // Unless required by applicable law or agreed to in writing, software
13 | // distributed under the License is distributed on an "AS IS" BASIS,
14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | // See the License for the specific language governing permissions and
16 | // limitations under the License.
17 | #endregion
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Api/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Src/Xigadee.AspNetCore/Interfaces/IPipelineAspNetCore.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Builder;
2 |
3 | namespace Xigadee
4 | {
5 | ///
6 | /// This pipeline is used to set Xigadee configuration parameters during the AspNet configuration.
7 | ///
8 | ///
9 | public interface IPipelineAspNetCore: IPipeline
10 | {
11 | ///
12 | /// Gets the AspNetCore application.
13 | ///
14 | IApplicationBuilder App { get; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure.ApiManagement/ApimPrincipal.cs:
--------------------------------------------------------------------------------
1 | using System.Security.Principal;
2 |
3 | namespace Xigadee
4 | {
5 | public class ApimPrincipal : GenericPrincipal
6 | {
7 | public ApimPrincipal(IIdentity identity, string[] roles) : base(identity, roles)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure.ApplicationInsights/CommandCorrelationInitializer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Diagnostics.Tracing;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using Microsoft.ApplicationInsights.Extensibility;
9 |
10 | namespace Xigadee
11 | {
12 | public class CommandCorrelationInitializer : ITelemetryInitializer
13 | {
14 | public void Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry)
15 | {
16 | //telemetry.Context.Operation.Id = CommandContext.CorrelationKey ?? telemetry.Context.Operation.Id;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure.ApplicationInsights/Configuration/ApplicationInsightsConfigShortcuts.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | ///
4 | /// These are the known shortcuts for Application Insights
5 | ///
6 | public enum ApplicationInsightsConfigShortcuts
7 | {
8 | ///
9 | /// The Application Insights key
10 | ///
11 | ApplicationInsights,
12 | ///
13 | /// The Application Insights logging level key
14 | ///
15 | ApplicationInsightsLoggingLevel,
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure.Base/Helper/AzureStorageEncryption.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | ///
4 | /// This settings determines the specific encryption settings for the data type.
5 | ///
6 | public enum AzureStorageEncryption
7 | {
8 | ///
9 | /// There is no encrpytion on the blob
10 | ///
11 | None,
12 | ///
13 | /// The blob is encrpyted when an encrpytion handler is present.
14 | ///
15 | BlobWhenPresent,
16 | ///
17 | /// The blob is always encrpyted. If no handler is present, an exception will be thrown.
18 | ///
19 | BlobAlwaysWithException
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure.DNS2/Class1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xigadee.Azure.DNS2
4 | {
5 | public class Class1
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure.DNS2/Xigadee.Azure.DNS2.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure.EventHubs/Communication/AzureEventHubsBridgeAgent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace Xigadee
6 | {
7 | ///
8 | /// This agent is used by the Event Hub fabric.
9 | ///
10 | ///
11 | public class AzureEventHubsBridgeAgent : CommunicationBridgeAgent
12 | {
13 | public AzureEventHubsBridgeAgent()
14 | {
15 |
16 | }
17 |
18 | public override IListener GetListener()
19 | {
20 | throw new NotImplementedException();
21 | }
22 |
23 | public override ISender GetSender()
24 | {
25 | throw new NotImplementedException();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure.EventHubs/Configuration/AzureStorageEncryption.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | ///
4 | /// This settings determines the specific encryption settings for the data type.
5 | ///
6 | public enum AzureStorageEncryption
7 | {
8 | ///
9 | /// There is no encrpytion on the blob
10 | ///
11 | None,
12 | ///
13 | /// The blob is encrpyted when an encrpytion handler is present.
14 | ///
15 | BlobWhenPresent,
16 | ///
17 | /// The blob is always encrpyted. If no handler is present, an exception will be thrown.
18 | ///
19 | BlobAlwaysWithException
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure.ServiceBus/Communication/NamespaceManager/NamespaceManagerHelper.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Azure.ServiceBus;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace Xigadee
7 | {
8 | public static partial class AzureServiceBusExtensionMethods
9 | {
10 | ///
11 | /// Gets the namespace manager.
12 | ///
13 | /// The connection.
14 | ///
15 | public static NamespaceManagerREST GetNamespaceManager(this ServiceBusConnectionStringBuilder connection)
16 | {
17 | return new NamespaceManagerREST(connection);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure.Storage/Helper/AzureStorageEncryption.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | ///
4 | /// This settings determines the specific encryption settings for the data type.
5 | ///
6 | public enum AzureStorageEncryption
7 | {
8 | ///
9 | /// There is no encrpytion on the blob
10 | ///
11 | None,
12 | ///
13 | /// The blob is encrpyted when an encrpytion handler is present.
14 | ///
15 | BlobWhenPresent,
16 | ///
17 | /// The blob is always encrpyted. If no handler is present, an exception will be thrown.
18 | ///
19 | BlobAlwaysWithException
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure.Storage/Helper/BinaryContainer.cs:
--------------------------------------------------------------------------------
1 | //namespace Xigadee
2 | //{
3 | // ///
4 | // /// This class holds the binary container.
5 | // ///
6 | // public class AzureStorageBinary
7 | // {
8 | // ///
9 | // /// This is the binary blob.
10 | // ///
11 | // public byte[] Blob { get; set; }
12 | // ///
13 | // /// This is the content type of the entity.
14 | // ///
15 | // public string ContentType { get; set; } = "application/json; charset=utf-8";
16 | // ///
17 | // /// This is the encoding type of the entity.
18 | // ///
19 | // public string ContentEncoding { get; set; } = null;
20 | // }
21 | //}
22 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure/ApplicationInsights/CommandCorrelationInitializer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Diagnostics.Tracing;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using Microsoft.ApplicationInsights.Extensibility;
9 |
10 | namespace Xigadee
11 | {
12 | public class CommandCorrelationInitializer : ITelemetryInitializer
13 | {
14 | public void Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry)
15 | {
16 | //telemetry.Context.Operation.Id = CommandContext.CorrelationKey ?? telemetry.Context.Operation.Id;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure/Communication/ServiceBus/Exceptions/AzureConnectionException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xigadee
4 | {
5 | ///
6 | /// This exception is thrown if Azure components are specified, but the pipeline configuration connection string has not been set.
7 | ///
8 | ///
9 | public class AzureConnectionException: ConfigurationMissingSettingException
10 | {
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | public AzureConnectionException(string key):base(key, $"A required Azure connection string '{key}' is null or empty. Please check the config settings has been set.")
15 | {
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure/DataCollection/Storage/Helper/BinaryContainer.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | ///
4 | /// This class holds the binary container.
5 | ///
6 | public class AzureStorageBinary
7 | {
8 | ///
9 | /// This is the binary blob.
10 | ///
11 | public byte[] Blob { get; set; }
12 | ///
13 | /// This is the content type of the entity.
14 | ///
15 | public string ContentType { get; set; } = "application/json; charset=utf-8";
16 | ///
17 | /// This is the encoding type of the entity.
18 | ///
19 | public string ContentEncoding { get; set; } = null;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Xigadee.Azure/Xigadee.Azure.licenseheader:
--------------------------------------------------------------------------------
1 | extensions: designer.cs generated.cs
2 | extensions: .cs
3 | #region Copyright
4 | // Copyright Hitachi Consulting
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | //
10 | // http://www.apache.org/licenses/LICENSE-2.0
11 | //
12 | // Unless required by applicable law or agreed to in writing, software
13 | // distributed under the License is distributed on an "AS IS" BASIS,
14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | // See the License for the specific language governing permissions and
16 | // limitations under the License.
17 | #endregion
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Communication/TcpTlsChannel/Helper/MakeCert.txt:
--------------------------------------------------------------------------------
1 | makecert -r -pe -n “CN=localhost” -m 12 -sky exchange -ss my serverCert.cer
2 |
3 | https://www.simple-talk.com/dotnet/.net-framework/tlsssl-and-.net-framework-4.0/
4 |
5 | https://blogs.msdn.microsoft.com/joncole/2007/06/13/sample-asynchronous-sslstream-clientserver-implementation/
6 |
7 | https://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-2
--------------------------------------------------------------------------------
/Src/Xigadee.Communication/Xigadee.Communication.licenseheader:
--------------------------------------------------------------------------------
1 | extensions: designer.cs generated.cs
2 | extensions: .cs
3 | #region Copyright
4 | // Copyright Hitachi Consulting
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | //
10 | // http://www.apache.org/licenses/LICENSE-2.0
11 | //
12 | // Unless required by applicable law or agreed to in writing, software
13 | // distributed under the License is distributed on an "AS IS" BASIS,
14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | // See the License for the specific language governing permissions and
16 | // limitations under the License.
17 | #endregion
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Communication/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Src/Xigadee.Console.DNS2/Class1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xigadee.Console.DNS2
4 | {
5 | public class Class1
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Src/Xigadee.Console.DNS2/Xigadee.Console.DNS2.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0;net47
5 | false
6 | Xigadee
7 |
8 |
9 |
10 | bin\Debug\netstandard2.0\Xigadee.Console.DNS2.xml
11 |
12 |
13 |
14 | bin\Debug\net47\Xigadee.Console.DNS2.xml
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Console/ConsoleConfigurationBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Xigadee
5 | {
6 | public abstract class ConsoleConfigurationBase
7 | {
8 | protected ConsoleConfigurationBase(string[] args)
9 | {
10 | Notifications = new List();
11 | try
12 | {
13 | Switches = args.CommandArgsParse();
14 | }
15 | catch (Exception)
16 | {
17 | Switches = new Dictionary();
18 | }
19 | }
20 |
21 | public List Notifications { get; private set; }
22 |
23 | public Dictionary Switches { get; private set; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/Xigadee.Console/ErrorInfo.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | ///
4 | /// This class holds the error information.
5 | ///
6 | public class ErrorInfo
7 | {
8 | ///
9 | /// This is the error severity level.
10 | ///
11 | public LoggingLevel Type;
12 | ///
13 | /// This is the message to be displayed
14 | ///
15 | public string Message;
16 | ///
17 | /// This is the incremental logging id.
18 | ///
19 | public long LoggingId;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Xigadee.Console/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Console/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/BoundaryLogger/MemoryBoundaryLogger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class MemoryBoundaryLogger: IBoundaryLogger
10 | {
11 | public Guid BatchPoll(int requested, int actual, string channelId)
12 | {
13 | var id = Guid.NewGuid();
14 |
15 | return id;
16 | }
17 |
18 | public void Log(ChannelDirection direction, TransmissionPayload payload, Exception ex = null, Guid? batchId = default(Guid?))
19 | {
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Channel/ChannelDirection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This enumeration specifies the direction of the message.
11 | ///
12 | public enum ChannelDirection
13 | {
14 | ///
15 | /// The message has been received from an external source.
16 | ///
17 | Incoming,
18 | ///
19 | /// The message has just been transmitted to an external source.
20 | ///
21 | Outgoing
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Command/EventHandlers/MasterJobStateChange.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This class contains the change information for the command.
11 | ///
12 | public class MasterJobStateChange
13 | {
14 | public MasterJobStateChange(MasterJobState oldState, MasterJobState newState)
15 | {
16 | StateOld = oldState;
17 | StateNew = newState;
18 | }
19 |
20 | public MasterJobState StateOld { get; protected set; }
21 |
22 | public MasterJobState StateNew { get; protected set; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Command/Exceptions/OutgoingRequestTransmitException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class OutgoingRequestTransmitException: Exception
10 | {
11 | public OutgoingRequestTransmitException(string message) : base(message)
12 | {
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Command/Handler/ICommandHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Threading.Tasks;
4 |
5 | namespace Xigadee
6 | {
7 | public interface ICommandHandler
8 | {
9 | void Initialise(MessageFilterWrapper key, Func, Task> action);
10 |
11 | MessageFilterWrapper Key { get; }
12 |
13 | Func, Task> Action { get; }
14 |
15 | Task Execute(TransmissionPayload rq, List rs);
16 |
17 | ICommandHandlerStatistics HandlerStatistics { get; }
18 | }
19 | }
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Command/Handler/ICommandHandlerStatistics.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xigadee
4 | {
5 | public interface ICommandHandlerStatistics
6 | {
7 | string LastAccessed { get; set; }
8 | string Name { get; set; }
9 | }
10 | }
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Command/Helper/CommandPolicyHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading;
6 | using System.Threading.Tasks;
7 |
8 | namespace Xigadee
9 | {
10 | public static class CommandPolicyHelper
11 | {
12 | public static CommandSchedule ToCommandSchedule(this CommandPolicy policy, Func execute, string name)
14 | {
15 | return new CommandSchedule(execute
16 | , policy.JobPollSchedule
17 | , name
18 | , policy.JobPollIsLongRunning);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Command/Statistics/MasterJobStatistics.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class MasterJobStatistics
10 | {
11 | public bool Active { get; set; }
12 | public string Status { get; set; }
13 | public string Server { get; set; }
14 |
15 | public List Standbys { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Communication/Interfaces/IMessaging.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface IMessaging
10 | {
11 | ///
12 | /// This is a list of clients for the listener or sender.
13 | ///
14 | IEnumerable Clients { get; }
15 |
16 | ///
17 | /// This is the channel for the messaging agent.
18 | ///
19 | string ChannelId { get; }
20 |
21 | ///
22 | /// This is the boundary logger used by the service.
23 | ///
24 | IBoundaryLogger BoundaryLogger { get; set; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Contract/IMessageContract.cs:
--------------------------------------------------------------------------------
1 | #region using
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | #endregion
8 | namespace Xigadee
9 | {
10 | ///
11 | /// This is the base interface used for message contracts.
12 | ///
13 | public interface IMessageContract
14 | {
15 |
16 | }
17 |
18 | public interface IMessageContractPayload
:IMessageContract
19 | {
20 |
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/EventSource/Interfaces/IEventSource.cs:
--------------------------------------------------------------------------------
1 | #region using
2 |
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | #endregion
9 | namespace Xigadee
10 | {
11 | ///
12 | /// This interface is used to provide generic support for event sources for components
13 | ///
14 | public interface IEventSource
15 | {
16 | Task Write(string originatorId, EventSourceEntry entry, DateTime? utcTimeStamp = null, bool sync = false);
17 |
18 | string Name { get; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/EventSource/Interfaces/IEventSourceContainer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface IEventSourceContainer
10 | {
11 | IEventSource EventSource { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Exceptions/ServiceAlreadyStartedException.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Xigadee
9 | {
10 | public class ServiceAlreadyStartedException:Exception
11 | {
12 | ///
13 | /// Initializes a new instance of the ServiceNotStartedException class.
14 | ///
15 | public ServiceAlreadyStartedException() : base() { }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Exceptions/ServiceNotStartedException.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Xigadee
9 | {
10 | public class ServiceNotStartedException:Exception
11 | {
12 | ///
13 | /// Initializes a new instance of the ServiceNotStartedException class.
14 | ///
15 | public ServiceNotStartedException() : base() { }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/IStatisticsBase.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | public interface IStatisticsBase
4 | {
5 | StatusBase StatisticsGet();
6 | }
7 | }
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Interfaces/ICache.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface ICacheComponent: IService
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Interfaces/IContainerService.cs:
--------------------------------------------------------------------------------
1 | #region using
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | #endregion
9 | namespace Xigadee
10 | {
11 | ///
12 | /// This interface is implemented by containers that contains services
13 | /// inside them. This allows the contained services to be started and stopped independently.
14 | ///
15 | public interface IContainerService
16 | {
17 | ///
18 | /// The services to start and stop.
19 | ///
20 | IEnumerable Services { get; }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Interfaces/IDataCollection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This is the combined interface that allow specific components to centralise all the logging capabilities in to single class.
11 | ///
12 | public interface IDataCollection: IBoundaryLogger, ILogger, IEventSource, ITelemetry, IServiceOriginator
13 | {
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Interfaces/IRequireSharedServices.cs:
--------------------------------------------------------------------------------
1 | #region using
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | #endregion
8 | namespace Xigadee
9 | {
10 | public interface IRequireSharedServices
11 | {
12 | ISharedService SharedServices { get; set; }
13 | }
14 |
15 | public interface ISharedService
16 | {
17 | bool RegisterService(I instance, string serviceName = null) where I : class;
18 |
19 | bool RegisterService(Lazy instance, string serviceName = null) where I : class;
20 |
21 | bool RemoveService() where I : class;
22 |
23 | I GetService() where I : class;
24 |
25 | bool HasService() where I : class;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Interfaces/IServiceEventSource.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Xigadee
5 | {
6 | public interface IServiceEventSource
7 | {
8 | ///
9 | /// This is the event source for the communication layer.
10 | ///
11 | IEventSource EventSource { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Interfaces/IServiceLogger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface IServiceLogger
10 | {
11 | ILoggerExtended Logger { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Interfaces/IServiceOriginator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface IServiceOriginator
10 | {
11 | ///
12 | /// The originator Id for the service.
13 | ///
14 | string OriginatorId { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Interfaces/ISupportedMessageTypes.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface ISupportedMessageTypes
10 | {
11 | ///
12 | /// This event is used to signal a change of registered commands.
13 | ///
14 | event EventHandler OnCommandChange;
15 | ///
16 | /// This is the supported message types for the listener.
17 | ///
18 | List SupportedMessages { get; }
19 | }
20 |
21 | public class SupportedMessagesChange
22 | {
23 | public List Messages { get; set; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Interfaces/ISupportsMessage.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | public interface ISupportsMessage
4 | {
5 | bool SupportsMessage(string messageType, string operation);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Interfaces/ITelemetry.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface ITelemetry
10 | {
11 | void TrackMetric(string metricName, double value);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Logging/DispatcherLoggerDirection.cs:
--------------------------------------------------------------------------------
1 | #region using
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | #endregion
8 | namespace Xigadee
9 | {
10 | ///
11 | /// This enum defines when the message is being logged.
12 | ///
13 | public enum DispatcherLoggerDirection
14 | {
15 | ///
16 | /// The message was logged as it entered the dispatcher.
17 | ///
18 | Incoming,
19 | ///
20 | /// The message was logged as it left the dispatcher.
21 | ///
22 | Outgoing
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Logging/Interfaces/ILogStoreName.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface ILogStoreName
10 | {
11 | string StorageId { get; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Logging/Interfaces/ILogger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 |
4 | namespace Xigadee
5 | {
6 | ///
7 | /// This is the root logger interface to support async logging support through the framework.
8 | ///
9 | public interface ILogger
10 | {
11 | ///
12 | /// This method asyncronously logs an event.
13 | ///
14 | /// The event to log.
15 | /// This is an async task.
16 | Task Log(LogEvent logEvent);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Logging/Interfaces/ILoggerExtended.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface ILoggerExtended : ILogger
10 | {
11 | void LogException(Exception ex);
12 | void LogException(string message, Exception ex);
13 | void LogMessage(string message);
14 | void LogMessage(LoggingLevel level, string message);
15 | void LogMessage(LoggingLevel level, string message, string category);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Logging/LoggingLevel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 |
4 | namespace Xigadee
5 | {
6 | public enum LoggingLevel
7 | {
8 | Trace = 10,
9 | Info = 11,
10 | Status = 12,
11 | Warning = 13,
12 | Error = 14,
13 | Fatal = 15
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Logging/LoggingStatistics.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class LoggingStatistics:MessagingStatistics
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Microservice/Configuration/IEnvironmentConfiguration.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xigadee
4 | {
5 | ///
6 | /// This inteface is used by extension method that provide shortcuts for specific key/value pairs
7 | /// from the environment configuration.
8 | ///
9 | public interface IEnvironmentConfiguration
10 | {
11 | Func Resolver { get; set; }
12 |
13 | bool ResolverFirst { get; set; }
14 |
15 | string PlatformOrConfigCache(string key, string defaultValue = null);
16 |
17 | bool PlatformOrConfigCacheBool(string key, string defaultValue = null);
18 |
19 | int PlatformOrConfigCacheInt(string key, int? defaultValue = default(int?));
20 | }
21 | }
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Microservice/Events.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class ProcessRequestUnresolvedEventArgs: MicroserviceEventArgs
10 | {
11 | public TransmissionPayload Payload { get; set; }
12 | }
13 |
14 | public class ProcessRequestErrorEventArgs: ProcessRequestUnresolvedEventArgs
15 | {
16 | public Exception Ex { get; set; }
17 | }
18 |
19 | ///
20 | /// This is the base event for microservice events.
21 | ///
22 | public class MicroserviceEventArgs: EventArgs
23 | {
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Microservice/MicroserviceStatusChangeException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class MicroserviceStatusChangeException: Exception
10 | {
11 | public MicroserviceStatusChangeException(string message, Exception ex):base(message, ex)
12 | {
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Commands/EntityChange/EntityChangeOrchestrationCommandBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class EntityChangeOrchestrationCommandBase: OrchestrationCommandBase
10 | where O : OrchestrationFlowComponentBase
11 | where S : OrchestrationCommandStatistics, new()
12 | where P : OrchestrationCommandPolicy, new()
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Commands/Input/InputOrchestrationCommandBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class InputOrchestrationCommandBase: OrchestrationCommandBase
10 | where O : OrchestrationFlowComponentBase
11 | where S : OrchestrationCommandStatistics, new()
12 | where P : OrchestrationCommandPolicy, new()
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Commands/Output/OutputOrchestrationCommandBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class OutputOrchestrationCommandBase: OrchestrationCommandBase
10 | where O : OrchestrationFlowComponentBase
11 | where S : OrchestrationCommandStatistics, new()
12 | where P : OrchestrationCommandPolicy, new()
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Commands/Schedule/ScheduleOrchestrationCommandBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class ScheduleOrchestrationCommandBase: OrchestrationCommandBase
10 | where O : OrchestrationFlowComponentBase
11 | where S : OrchestrationCommandStatistics, new()
12 | where P : OrchestrationCommandPolicy, new()
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Commands/Transform/TransformOrchestrationCommandBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class TransformOrchestrationCommandBase: OrchestrationCommandBase
10 | where O : OrchestrationFlowComponentBase
11 | where S : OrchestrationCommandStatistics, new()
12 | where P : OrchestrationCommandPolicy, new()
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Commands/Validate/ValidateOrchestrationCommandBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class ValidateOrchestrationCommandBase: OrchestrationCommandBase
10 | where O : OrchestrationFlowComponentBase
11 | where S : OrchestrationCommandStatistics, new()
12 | where P : OrchestrationCommandPolicy, new()
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Context/OrchestrationContextState.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public static class OrchestrationContextStateHelper
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Flow/Components/EntityChange/EntityChangeBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class EntityChangeBase: OrchestrationFlowComponentBase
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Flow/Components/Input/InputBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class InputBase: OrchestrationFlowComponentBase
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Flow/Components/Output/OutputBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class OutputBase: OrchestrationFlowComponentBase
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Flow/Components/Schedule/ScheduleBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class ScheduleBase: OrchestrationFlowComponentBase
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Flow/Components/Transform/TransformBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class TransformBase: OrchestrationFlowComponentBase
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Flow/Components/Validate/ValidationBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class ValidationBase: OrchestrationFlowComponentBase
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Flow/OrchestrationFlowPath.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class OrchestrationFlowPath
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/Flow/OrchestrationFlowValidator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class OrchestrationFlowValidator
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/OrchestrationCommandPolicy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This is the base policy class that is used to configure the command.
11 | ///
12 | public class OrchestrationCommandPolicy: CommandPolicy
13 | {
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Orchestration/OrchestrationCommandStatistics.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This is the base class that is used to record the state of the orchestration command.
11 | ///
12 | public class OrchestrationCommandStatistics:CommandStatistics
13 | {
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Cache/EntityCacheAsyncPolicy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class EntityCacheAsyncPolicy:CommandPolicy
10 | {
11 | public EntityCacheAsyncPolicy()
12 | {
13 | }
14 |
15 | public bool EntityChangeTrackEvents { get; set; }
16 |
17 | public string EntityChangeEventsChannel { get; set; }
18 |
19 | public int EntityCacheLimit { get; set; } = 200000;
20 |
21 | public TimeSpan EntityDefaultTTL { get; set; } = TimeSpan.FromDays(2);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Cache/EntityCacheChangeEventArgs.cs:
--------------------------------------------------------------------------------
1 | #region using
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Threading.Tasks;
5 | #endregion
6 | namespace Xigadee
7 | {
8 | public class EntityCacheChangeEventArgs: EventArgs
9 | {
10 |
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Cache/EntityCacheHolderState.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public enum EntityCacheHolderState
10 | {
11 | Start,
12 | Requesting,
13 | Completed,
14 | Cancelled
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Cache/EntityCacheResult.cs:
--------------------------------------------------------------------------------
1 | #region using
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Threading.Tasks;
5 | #endregion
6 | namespace Xigadee
7 | {
8 | public class EntityCacheResult
9 | {
10 | public bool Success { get; set; }
11 |
12 | public bool Exists { get; set; }
13 |
14 | public E Entity { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Cache/IEntityCacheAsync.cs:
--------------------------------------------------------------------------------
1 | #region using
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Threading.Tasks;
5 | #endregion
6 | namespace Xigadee
7 | {
8 | ///
9 | /// This is the interface that is used to share cached content.
10 | ///
11 | /// The key type.
12 | /// The cache entity.
13 | public interface IEntityCacheAsync: ICacheComponent
14 | where K : IEquatable
15 | {
16 | //event EventHandler Changed;
17 |
18 | Task ContainsKey(K key);
19 |
20 | Task> TryGetEntity(K key);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Client/Base/PersistenceInitiatorPolicy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This class is used for persistence based shortcuts.
11 | ///
12 | public class PersistenceInitiatorPolicy: CommandPolicy
13 | {
14 | public override bool OutgoingRequestsEnabled { get; set; } = true;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Client/Base/PersistenceInitiatorStatistics.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This is the statistics class used to record the status of the command.
11 | ///
12 | public class PersistenceInitiatorStatistics: CommandStatistics
13 | {
14 | #region Constructor
15 | ///
16 | /// This is the default constructor.
17 | ///
18 | public PersistenceInitiatorStatistics() : base()
19 | {
20 | }
21 | #endregion
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/ExtensionMethods.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public static class PersistenceExtensionMethods
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Interfaces/IPersistenceMessageHandler.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | ///
4 | /// This interface is used to consistently reference the persistence handler irrespective
5 | /// of the underlying implementation.
6 | ///
7 | public interface IPersistenceMessageHandler: IStatisticsBase
8 | {
9 | string ChannelId { get; set; }
10 |
11 | string EntityType { get; }
12 |
13 | }
14 | }
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Interfaces/IPersistenceMessageInitiator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface IPersistenceMessageInitiator: IStatisticsBase
10 | {
11 | PersistenceInitiatorStatistics Statistics { get; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Interfaces/IPersistenceSharedService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface IPersistenceSharedService: IStatisticsBase
10 | {
11 | PersistenceInitiatorStatistics Statistics { get; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Policy/CircuitBreakerPolicy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xigadee
4 | {
5 | public class CircuitBreakerPolicy: PolicyBase
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Server/DocumentDb/DocumentDbPersistenceCommandPolicy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This class provides specific directives for communicating with the DocumentDb server.
11 | ///
12 | public class DocumentDbPersistenceCommandPolicy: PersistenceCommandPolicy
13 | {
14 |
15 | public bool AutoCreateDatabase { get; set; } = true;
16 |
17 | public bool AutoCreateCollections { get; set; } = true;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Server/DocumentDb/Helper/SearchParameter.cs:
--------------------------------------------------------------------------------
1 | #region using
2 | #endregion
3 | namespace Xigadee
4 | {
5 | public class SearchParameter
6 | {
7 | public string Name { get; set; }
8 |
9 | public string Value { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Server/IPersistenceRequestHolder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | #region using
3 | #endregion
4 | namespace Xigadee
5 | {
6 | public interface IPersistenceRequestHolder
7 | {
8 | Guid ProfileId { get; }
9 |
10 | int Start { get; }
11 |
12 | string Debug { get; }
13 |
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Server/IPersistenceResponseHolder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace IMGroup.Microservice
4 | {
5 | public interface IPersistenceResponseHolder
6 | {
7 | Exception Ex { get; set; }
8 |
9 | bool IsSuccess { get; set; }
10 |
11 | bool IsTimeout { get; set; }
12 |
13 | bool IsThrottled { get; set; }
14 |
15 | int StatusCode { get; set; }
16 |
17 | byte[] Content { get; set; }
18 |
19 | string VersionId { get; set; }
20 | }
21 | }
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Server/JSON/JsonResponseHolder.cs:
--------------------------------------------------------------------------------
1 | #region using
2 | using IMGroup.Core;
3 | using IMGroup.Core.Persistence;
4 | using IMGroup.Core.Persistence.DocumentDb;
5 | using Newtonsoft.Json;
6 | using Newtonsoft.Json.Linq;
7 | using System;
8 | using System.Collections.Generic;
9 | using System.Linq;
10 | using System.Text;
11 | using System.Threading.Tasks;
12 | #endregion
13 | namespace IMGroup.Microservice
14 | {
15 | public class JsonResponseHolder:RepositoryHolder, IPersistenceResponseHolder
16 | {
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Server/Memory/BehaviourRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class MemoryPersistenceDirectiveRequest: IEquatable
10 | {
11 | public Guid Id { get; set; } = Guid.NewGuid();
12 |
13 | public bool Equals(MemoryPersistenceDirectiveRequest other)
14 | {
15 | return other.Id == Id;
16 | }
17 | }
18 |
19 | public class MemoryPersistenceDirectiveResponse
20 | {
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Persistence/Server/ResponseHolderBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace IMGroup.Microservice
8 | {
9 | public class ResponseHolderBase: IPersistenceResponseHolder
10 | {
11 | public byte[] Content { get; set; }
12 |
13 |
14 | public Exception Ex { get; set; }
15 |
16 |
17 | public bool IsSuccess { get; set; }
18 |
19 |
20 | public bool IsThrottled { get; set; }
21 |
22 |
23 | public bool IsTimeout { get; set; }
24 |
25 |
26 | public int StatusCode { get; set; }
27 |
28 |
29 | public string VersionId { get; set; }
30 |
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Pipeline/Exceptions/ChannelIdMismatchException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class ChannelIdMismatchException: ChannelPartitionConfigBaseException
10 | {
11 | public ChannelIdMismatchException(string channelId, ChannelDirection direction, string mismatchId) : base(channelId)
12 | {
13 | MismatchChannelId = mismatchId;
14 | Direction = direction;
15 | }
16 |
17 | public string MismatchChannelId { get; }
18 |
19 | public ChannelDirection Direction { get; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Pipeline/Exceptions/ChannelInternalOnlyException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class ChannelInternalOnlyException: ChannelPartitionConfigBaseException
10 | {
11 | public ChannelInternalOnlyException(string channelId, ChannelDirection direction) :base(channelId)
12 | {
13 | Direction = direction;
14 | }
15 |
16 | public ChannelDirection Direction { get; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Pipeline/Exceptions/ChannelPartitionConfigBaseException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class ChannelPartitionConfigBaseException:Exception
10 | {
11 | public ChannelPartitionConfigBaseException(string channelId)
12 | {
13 | ChannelId = channelId;
14 | }
15 |
16 | public string ChannelId { get; }
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Pipeline/Exceptions/ChannelPartitionConfigCastException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class ChannelPartitionConfigCastException: ChannelPartitionConfigBaseException
10 | {
11 | public ChannelPartitionConfigCastException(string channelId):base(channelId)
12 | {
13 |
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Pipeline/Exceptions/ChannelPartitionConfigExistsException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class ChannelPartitionConfigExistsException: ChannelPartitionConfigBaseException
10 | {
11 | public ChannelPartitionConfigExistsException(string channelId, int channelPriority) : base(channelId)
12 | {
13 | ChannelPriority = channelPriority;
14 | }
15 |
16 | public int ChannelPriority { get; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Pipeline/Exceptions/SharedServiceRegistrationException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This exception is thrown when the registration of a shared service fails.
11 | ///
12 | public class SharedServiceRegistrationException: Exception
13 | {
14 | public SharedServiceRegistrationException(string typeName, string serviceName)
15 | {
16 | TypeName = typeName;
17 | ServiceName = serviceName;
18 | }
19 |
20 | public string TypeName { get; }
21 |
22 | public string ServiceName { get; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Pipeline/Extensions/CallOut.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public static partial class CorePipelineExtensions
10 | {
11 | public static MicroservicePipeline CallOut(this MicroservicePipeline pipe, Action method)
12 | {
13 | method(pipe);
14 |
15 | return pipe;
16 | }
17 |
18 | public static P CallOut
(this P pipe, Action
method)
19 | where P : ChannelPipelineBase
20 | {
21 | method(pipe);
22 |
23 | return pipe;
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Pipeline/Extensions/Revert.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public static partial class CorePipelineExtensions
10 | {
11 | public static MicroservicePipeline Revert(this C cpipe, Action assign = null)
12 | where C : ChannelPipelineBase
13 | {
14 | assign?.Invoke(cpipe);
15 |
16 | return cpipe.Pipeline;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Pipeline/Extensions/Security.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public static partial class CorePipelineExtensions
10 | {
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Pipeline/Extensions/Start.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public static partial class CorePipelineExtensions
10 | {
11 | public static void Start(this MicroservicePipeline pipeline)
12 | {
13 | pipeline.Service.Start();
14 | }
15 |
16 | public static void Stop(this MicroservicePipeline pipeline)
17 | {
18 | pipeline.Service.Stop();
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Pipeline/Extensions/To.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee.Pipeline.Extensions
8 | {
9 | public static partial class CorePipelineExtensions
10 | {
11 | public static IMicroservice ToMicroservice(this MicroservicePipeline pipeline)
12 | {
13 | return pipeline.Service;
14 | }
15 |
16 | public static IEnvironmentConfiguration ToConfiguration(this MicroservicePipeline pipeline)
17 | {
18 | return pipeline.Configuration;
19 | }
20 |
21 | public static Channel ToChannel(this ChannelPipelineIncoming cpipe)
22 | {
23 | return cpipe.Channel;
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/PolicyBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This is the base class for Microservice based policy settings.
11 | ///
12 | public abstract class PolicyBase
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/ResourceTracker/CircuitBreakerBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xigadee
4 | {
5 | ///
6 | /// This abstract class is used to implement circuit breaker functionality.
7 | ///
8 | public abstract class CircuitBreakerAlgorithmBase
9 | {
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/ResourceTracker/CircuitBreakerState.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xigadee
4 | {
5 | [Flags()]
6 | public enum CircuitBreakerState: int
7 | {
8 | Open = 1,
9 | Closed = 2,
10 | HalfOpen = 3
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/ResourceTracker/Interfaces/IResourceBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface IResourceBase
10 | {
11 | Guid ResourceId { get; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/ResourceTracker/Interfaces/IResourceConsumer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface IResourceConsumer: IResourceBase
10 | {
11 | Guid Start(string group, Guid requestId);
12 |
13 | void End(Guid profileId, int start, ResourceRequestResult result);
14 |
15 | void Retry(Guid profileId, int retryStart, ResourceRetryReason reason);
16 |
17 | void Exception(Guid profileId, int retryStart);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/ResourceTracker/Interfaces/IResourceRequestRateLimiter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface IResourceRequestRateLimiter: IResourceBase
10 | {
11 | ///
12 | /// This is the rate that the request process should adjust as a ratio 1 is the default without limiting.
13 | /// 0 is when the circuit breaker.
14 | ///
15 | double RateLimitAdjustmentPercentage { get; }
16 |
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/ResourceTracker/Interfaces/IResourceTracker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface IResourceTracker
10 | {
11 | IResourceConsumer RegisterConsumer(string name, ResourceProfile profile);
12 |
13 | IResourceRequestRateLimiter RegisterRequestRateLimiter(string name, IEnumerable profiles);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/ResourceTracker/Interfaces/ResourceRequestResult.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public enum ResourceRequestResult
10 | {
11 | Success,
12 | Exception,
13 | TaskCancelled,
14 | RetryExceeded,
15 | Unknown
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/ResourceTracker/Interfaces/ResourceRetryReason.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public enum ResourceRetryReason
10 | {
11 | Throttle,
12 | Timeout,
13 | Exception,
14 | Other
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/ResourceTracker/ResourceBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public abstract class ResourceBase: IResourceBase
10 | {
11 | private Guid mId = Guid.NewGuid();
12 | protected string mName;
13 |
14 | public Guid ResourceId
15 | {
16 | get
17 | {
18 | return mId;
19 | }
20 | }
21 |
22 | public string Name
23 | {
24 | get{ return mName; }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/ResourceTracker/ResourceProfile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Xigadee
9 | {
10 | [DebuggerDisplay("ResourceProfile: {Id}")]
11 | public class ResourceProfile
12 | {
13 | public ResourceProfile(string id)
14 | {
15 | Id = id;
16 | }
17 | ///
18 | /// This is the Id of the resource profile.
19 | ///
20 | public string Id { get; set; }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Security/SecurityGatekeeperBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public interface ISecurityGatekeeper
10 | {
11 |
12 | }
13 |
14 | public class SecurityGatekeeperBase: ISecurityGatekeeper
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Statistics/CollectionStatistics.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class CollectionStatistics: StatusBase, ICollectionStatistics
10 | {
11 | public virtual int ItemCount { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Core/Statistics/ICollectionStatistics.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | public interface ICollectionStatistics
4 | {
5 | int ItemCount { get; set; }
6 | }
7 | }
--------------------------------------------------------------------------------
/Src/Xigadee.Core/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Boundary/Poll.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE [Boundary].[Poll]
2 | (
3 | [Id] BIGINT NOT NULL IDENTITY(1,1) PRIMARY KEY,
4 | [TimeStamp] DATETIME2 NOT NULL DEFAULT(SYSUTCDATETIME()),
5 | [ServiceName] VARCHAR(50) NOT NULL,
6 | [ServiceId] VARCHAR(50) NOT NULL,
7 | [BatchId] UNIQUEIDENTIFIER NOT NULL,
8 |
9 | [Requested] INT NOT NULL,
10 | [Returned] INT NOT NULL,
11 | [ChannelId] SMALLINT NULL,
12 | )
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Core/Batch.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE [Core].[Batch]
2 | (
3 | [Id] INT NOT NULL PRIMARY KEY IDENTITY(1,1)
4 | ,[BatchId] UNIQUEIDENTIFIER NOT NULL
5 | ,[DateFirstRecorded] DATETIME NOT NULL DEFAULT(GETUTCDATE())
6 | )
7 | GO
8 | CREATE UNIQUE INDEX [IX_Batch_BatchId] ON [Core].[Batch] ([BatchId]) INCLUDE ([Id])
9 | GO
10 |
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Core/Channel.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE [Core].[Channel]
2 | (
3 | [Id] SMALLINT NOT NULL PRIMARY KEY IDENTITY(1,1)
4 | ,[Name] VARCHAR(250) NOT NULL
5 | ,[DateFirstRecorded] DATETIME NOT NULL DEFAULT(GETUTCDATE())
6 | )
7 | GO
8 | CREATE UNIQUE INDEX [IX_Channel_Id] ON [Core].[Channel] ([Name]) INCLUDE ([Id])
9 | GO
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Core/Helper/Resolve_Batch.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE [Core].[Resolve_Batch]
2 | @Name UNIQUEIDENTIFIER
3 | ,@Id INT OUTPUT
4 | AS
5 | BEGIN
6 |
7 | IF (@Name IS NULL)
8 | RETURN 200;
9 |
10 | SELECT @Id = [Id] FROM [Core].[Batch] WHERE [BatchId]=@Name
11 |
12 | IF (@Id IS NULL)
13 | BEGIN
14 | INSERT INTO [Core].[Batch] ([BatchId]) VALUES (@Name)
15 |
16 | SELECT @Id = CAST(SCOPE_IDENTITY() AS INT);
17 | END
18 |
19 | END
20 |
21 |
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Core/Service.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE [Core].[Service]
2 | (
3 | [Id] SMALLINT NOT NULL PRIMARY KEY IDENTITY(1,1)
4 | ,[Name] VARCHAR(50) NOT NULL
5 | )
6 | GO
7 | CREATE UNIQUE INDEX [IX_Service_Id] ON [Core].[Service] ([Name]) INCLUDE ([Id])
8 | GO
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Datapump/Entity.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE [Datapump].[Entity]
2 | (
3 | [Id] BIGINT NOT NULL PRIMARY KEY IDENTITY(1,1)
4 | ,[EntityType] SMALLINT NOT NULL
5 | ,[Key] NVARCHAR(255) NOT NULL
6 | ,[DateFirstRecorded] DATETIME NOT NULL DEFAULT(GETUTCDATE())
7 | CONSTRAINT [FK_Entity_ToEntityType] FOREIGN KEY ([EntityType]) REFERENCES [Datapump].[EntityType]([Id])
8 | )
9 | GO
10 | CREATE UNIQUE INDEX [IX_Entity_Unique] ON [Datapump].[Entity] ([EntityType],[Key])
11 | GO
12 |
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Datapump/EntityType.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE [Datapump].[EntityType]
2 | (
3 | [Id] SMALLINT NOT NULL PRIMARY KEY IDENTITY(1,1)
4 | ,[Name] VARCHAR(250) NOT NULL
5 | )
6 | GO
7 | CREATE UNIQUE INDEX [IX_EntityType_Name] ON [Datapump].[EntityType]([Name]) INCLUDE ([Id])
8 | GO
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Datapump/EventSourceData.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE [Datapump].[EventSourceData]
2 | (
3 | [Id] BIGINT NOT NULL PRIMARY KEY IDENTITY(1,1)
4 | ,[IdParent] BIGINT NOT NULL
5 | ,[CanRemove] BIT NOT NULL DEFAULT 0
6 | ,[Data] NVARCHAR(MAX) NOT NULL
7 | CONSTRAINT [FK_EventSourceData_ToEventSource] FOREIGN KEY ([IdParent]) REFERENCES [Datapump].[EventSource]([Id])
8 | )
9 | GO
10 |
11 | CREATE UNIQUE INDEX [IX_EventSourceData_Parent] ON [Datapump].[EventSourceData] ([IdParent])
12 |
13 | GO
14 |
15 | CREATE INDEX [IX_EventSourceData_CanRemove] ON [Datapump].[EventSourceData] ([CanRemove]) INCLUDE ([Id]) WHERE [CanRemove]=1
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Datapump/EventType.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE [Datapump].[EventType]
2 | (
3 | [Id] TINYINT NOT NULL PRIMARY KEY IDENTITY(1,1)
4 | ,[Name] VARCHAR(50) NOT NULL
5 | )
6 | GO
7 | CREATE UNIQUE INDEX [IX_EventType_Name] ON [Datapump].[EventType]([Name]) INCLUDE ([Id])
8 | GO
9 |
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Datapump/Helper/Resolve_Entity.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE [Datapump].[Resolve_Entity]
2 | @EntityType VARCHAR(250)
3 | ,@Key VARCHAR(250)
4 | ,@EntityId BIGINT OUTPUT
5 | ,@EntityTypeId SMALLINT OUTPUT
6 | AS
7 | BEGIN
8 |
9 | EXEC [Datapump].[Resolve_EntityType] @EntityType, @EntityTypeId OUTPUT
10 |
11 | SELECT @EntityId = [Id] FROM [Datapump].[Entity] WHERE [EntityType]=@EntityTypeId AND [Key]=@Key ;
12 |
13 | IF (@EntityId IS NULL)
14 | BEGIN
15 | INSERT INTO [Datapump].[Entity] ([EntityType], [Key]) VALUES (@EntityTypeId, @Key)
16 |
17 | SELECT @EntityId = CAST(SCOPE_IDENTITY() AS BIGINT);
18 | END
19 | END
20 |
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Datapump/Helper/Resolve_EntityType.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE [Datapump].[Resolve_EntityType]
2 | @Name VARCHAR(250)
3 | ,@Id SMALLINT OUTPUT
4 | AS
5 | BEGIN
6 |
7 | SELECT @Id = [Id] FROM [Datapump].[EntityType] WHERE [Name]=@Name
8 |
9 | IF (@Id IS NULL)
10 | BEGIN
11 | INSERT INTO [Datapump].[EntityType] ([Name]) VALUES (@Name)
12 |
13 | SELECT @Id = CAST(SCOPE_IDENTITY() AS SMALLINT);
14 | END
15 | END
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Datapump/Helper/Resolve_EventType.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE [Datapump].[Resolve_EventType]
2 | @Name VARCHAR(50)
3 | ,@Id SMALLINT OUTPUT
4 | AS
5 | BEGIN
6 |
7 | SELECT @Id = [Id] FROM [Datapump].[EventType] WHERE [Name]=@Name
8 |
9 | IF (@Id IS NULL)
10 | BEGIN
11 | INSERT INTO [Datapump].[EventType] ([Name]) VALUES (@Name)
12 |
13 | SELECT @Id = CAST(SCOPE_IDENTITY() AS SMALLINT);
14 | END
15 | END
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Datapump/Helper/Resolve_Instance.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE [Datapump].[Resolve_Instance]
2 | @Name NVARCHAR(250)
3 | ,@Id INT OUTPUT
4 | AS
5 | BEGIN
6 |
7 | SELECT @Id = [Id] FROM [Datapump].[Instance] WHERE [Name]=@Name
8 |
9 | IF (@Id IS NULL)
10 | BEGIN
11 | INSERT INTO [Datapump].[Instance] ([Name]) VALUES (@Name)
12 |
13 | SELECT @Id = CAST(SCOPE_IDENTITY() AS INT);
14 | END
15 | END
16 |
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Datapump/Instance.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE [Datapump].[Instance]
2 | (
3 | [Id] INT NOT NULL PRIMARY KEY IDENTITY(1,1)
4 | ,[Name] NVARCHAR(250) NOT NULL
5 | ,[DateFirstRecorded] DATETIME NOT NULL DEFAULT(GETUTCDATE())
6 | )
7 | GO
8 | CREATE UNIQUE INDEX [IX_Instance_Name] ON [Datapump].[Instance] ([Name]) INCLUDE ([Id])
9 | GO
10 |
--------------------------------------------------------------------------------
/Src/Xigadee.Datapump.Sql/Schemas.sql:
--------------------------------------------------------------------------------
1 | CREATE SCHEMA [External]
2 | GO
3 | CREATE SCHEMA [DataPump]
4 | GO
5 | CREATE SCHEMA [Boundary]
6 | GO
7 | CREATE SCHEMA [Core]
8 | GO
9 |
--------------------------------------------------------------------------------
/Src/Xigadee.Framework/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Src/Xigadee.Framework/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Src/Xigadee.Helper2/Placeholder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace IMGroup.Core
8 | {
9 | class Placeholder
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Src/Xigadee.Platform/Command/Command/Attributes/CommandContract/PayloadInAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This attribute can be used to specify the payload parameter for a specific command definition.
11 | ///
12 | [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)]
13 | public class PayloadInAttribute:Attribute
14 | {
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Platform/Command/Command/Attributes/CommandContract/PayloadOutAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This attribute can be used to specify a payload out parameter for a request/response command.
11 | ///
12 | [AttributeUsage(AttributeTargets.ReturnValue | AttributeTargets.Parameter, AllowMultiple = false)]
13 | public class PayloadOutAttribute: Attribute
14 | {
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/Xigadee.Platform/Command/Command/Exceptions/OutgoingRequestsNotEnabledException.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | ///
4 | /// This exception is thrown when a command attempts to make an outgoing request, but this
5 | /// capability has not been enabled in the policy settings.
6 | ///
7 | public class OutgoingRequestsNotEnabledException:CommandException
8 | {
9 | ///
10 | /// This is the default constructor.
11 | ///
12 | public OutgoingRequestsNotEnabledException():base("Outgoing requests are not enabled. Please set the command policy 'OutgoingRequestsEnabled' to true.")
13 | {
14 |
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Platform/Command/Command/Harness/CommandHarnessTrafficDirection.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | ///
4 | /// This is the direction of the command request.
5 | ///
6 | public enum CommandHarnessTrafficDirection
7 | {
8 | ///
9 | /// The request was generated externally in to the command.
10 | ///
11 | Request,
12 | ///
13 | /// The request was generated by the command in response to a request
14 | ///
15 | Response,
16 | ///
17 | /// The request was generated in the command and is outgoing.
18 | ///
19 | Outgoing
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Src/Xigadee.Platform/Command/Command/Helper/MasterJobCommunicationDirection.cs:
--------------------------------------------------------------------------------
1 | namespace Xigadee
2 | {
3 | ///
4 | /// This is the message direction.
5 | ///
6 | public enum MasterJobCommunicationDirection
7 | {
8 | ///
9 | /// The message originated from an external source
10 | ///
11 | Incoming,
12 | ///
13 | /// The message originated internally.
14 | ///
15 | Outgoing
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/Xigadee.Platform/Command/CommandContainer/CommandContainerStatistics.cs:
--------------------------------------------------------------------------------
1 | #region using
2 | using System;
3 | using System.Collections.Concurrent;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | #endregion
10 | namespace Xigadee
11 | {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Platform/Command/CommandPersistence/Notification/EntityChangeNotificationCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | ///
10 | /// This command transmits command change notifications, and can also listen for changes and notify subscribing services.
11 | ///
12 | public class EntityChangeNotificationCommand:CommandBase
13 | {
14 | public EntityChangeNotificationCommand()
15 | {
16 |
17 | }
18 |
19 | public void Publish(EntityChangeEventArgs change)
20 | {
21 |
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/Xigadee.Platform/Command/CommandPersistence/Notification/EntityChangeNotificationPolicy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class EntityChangeNotificationPolicy:CommandPolicy
10 | {
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Platform/Command/CommandPersistence/Notification/EntityChangeNotificationStatistics.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xigadee
8 | {
9 | public class EntityChangeNotificationStatistics:CommandStatistics
10 | {
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Src/Xigadee.Platform/Command/_docs/CommandHarness.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | # The Command Harness
9 | The command harness is a test harness that allows you to test your command without the need to spin up a full Microservice environment.
10 |
11 |
12 |
13 | ## Using the Command Harness
14 |
15 |
7 |
8 | # The Command Persistence
9 | The command harness is a test harness that allows you to test your command without the need to spin up a full Microservice environment.
10 |
11 |
12 |
13 | ## Using the Command Harness
14 |
15 |