Ejemplo n.º 1
0
    public static MotorCloudEvent <T> CreateTestCloudEvent <T>(T data, Uri?source = null)
        where T : class
    {
        var applicationNameService = new TestApplicationNameService(source);

        return(new MotorCloudEvent <T>(applicationNameService, data, applicationNameService.GetSource())
               .SetMotorVersion());
    }
Ejemplo n.º 2
0
        public static MotorCloudEvent <T> CreateTestCloudEvent <T>(T data, Uri?source = null,
                                                                   IEnumerable <ICloudEventExtension>?extensions = null)
            where T : class
        {
            var applicationNameService = new TestApplicationNameService(source);

            return(new MotorCloudEvent <T>(applicationNameService, data, typeof(T).Name,
                                           applicationNameService.GetSource(), extensions: extensions?.ToArray() ?? Array.Empty <ICloudEventExtension>()));
        }