1
I Use This!
Inactive

News

Analyzed 12 days ago. based on code collected about 1 month ago.
Posted over 12 years ago by loraderon
Removing IEvent requirement (breaking change) The IEvent interface has been removed and you can now publish and subscribe to any poco class. using System; using Nvents; namespace NventsSample { class Program { static void ... [More] Main(string[] args) { // subscribe to events Events.Subscribe<FooEvent>( e => Console.WriteLine(e.Bar)); // publish events Events.Publish(new FooEvent { Bar = "FooBar" }); Console.ReadLine(); } } public class FooEvent // no longer inheriting from IEvent { public string Bar { get; set; } } } IPC (inter-process communication) support Communication on the same machine (without the need for a TCP connection) is now supported via named pipes. using System; using Nvents; using Nvents.Services; namespace NventsSample { class Program { static void Main(string[] args) { Events.Service = new NamedPipesService(); // can also name the pipe; new NamedPipesService(pipe: "pipe name") Events.Subscribe<FooEvent>( e => Console.WriteLine(e.Bar)); Events.Publish(new FooEvent { Bar = "FooBar" }); Console.ReadLine(); } } public class FooEvent { public string Bar { get; set; } } } Another breaking change is that InProcessService has been renamed to InMemoryService. [Less]
Posted over 12 years ago by loraderon
Removing IEvent requirement (breaking change) The IEvent interface has been removed and you can now publish and subscribe to any poco class. using System; using Nvents; namespace NventsSample { class Program { static void ... [More] Main(string[] args) { // subscribe to events Events.Subscribe<FooEvent>( e => Console.WriteLine(e.Bar)); // publish events Events.Publish(new FooEvent { Bar = "FooBar" }); Console.ReadLine(); } } public class FooEvent // no longer inheriting from IEvent { public string Bar { get; set; } } } IPC (inter-process communication) support Communication on the same machine (without the need for a TCP connection) is now supported via named pipes. using System; using Nvents; using Nvents.Services; namespace NventsSample { class Program { static void Main(string[] args) { Events.Service = new NamedPipesService(); // can also name the pipe; new NamedPipesService(pipe: "pipe name") Events.Subscribe<FooEvent>( e => Console.WriteLine(e.Bar)); Events.Publish(new FooEvent { Bar = "FooBar" }); Console.ReadLine(); } } public class FooEvent { public string Bar { get; set; } } } Another breaking change is that InProcessService has been renamed to InMemoryService. [Less]
Posted over 12 years ago by loraderon
Removing IEvent requirement (breaking change) The IEvent interface has been removed and you can now publish and subscribe to any poco class. using System; using Nvents; namespace NventsSample { class Program { static void Main(string[] ... [More] args) { // subscribe to events Events.Subscribe( e => Console.WriteLine(e.Bar)); // publish events Events.Publish(new FooEvent { Bar = "FooBar" }); Console.ReadLine(); } } public class FooEvent // no longer inheriting from IEvent { public string Bar { get; set; } } } IPC (inter-process communication) support Communication on the same machine (without the need for a TCP connection) is now supported via named pipes. using System; using Nvents; using Nvents.Services; namespace NventsSample { class Program { static void Main(string[] args) { Events.Service = new NamedPipesService(); // can also name the pipe; new NamedPipesService(pipe: "pipe name") Events.Subscribe( e => Console.WriteLine(e.Bar)); Events.Publish(new FooEvent { Bar = "FooBar" }); Console.ReadLine(); } } public class FooEvent { public string Bar { get; set; } } } Another breaking change is that InProcessService has been renamed to InMemoryService. [Less]
Posted over 12 years ago by loraderon
Removing IEvent requirement (breaking change) The IEvent interface has been removed and you can now publish and subscribe to any poco class. using System; using Nvents; namespace NventsSample { class Program { static void Main(string[] ... [More] args) { // subscribe to events Events.Subscribe( e => Console.WriteLine(e.Bar)); // publish events Events.Publish(new FooEvent { Bar = "FooBar" }); Console.ReadLine(); } } public class FooEvent // no longer inheriting from IEvent { public string Bar { get; set; } } } IPC (inter-process communication) support Communication on the same machine (without the need for a TCP connection) is now supported via named pipes. using System; using Nvents; using Nvents.Services; namespace NventsSample { class Program { static void Main(string[] args) { Events.Service = new NamedPipesService(); // can also name the pipe; new NamedPipesService(pipe: "pipe name") Events.Subscribe( e => Console.WriteLine(e.Bar)); Events.Publish(new FooEvent { Bar = "FooBar" }); Console.ReadLine(); } } public class FooEvent { public string Bar { get; set; } } } Another breaking change is that InProcessService has been renamed to InMemoryService. [Less]
Posted about 14 years ago by loraderon
Why was there no support for .NET 3.5 prior to nvents 0.6? To enable automatic discovery of all nvents clients we are using WCF Discovery which is a implementation of WS-Discovery. However, WCF Discovery is only supported by .NET 4.0 so nvents ... [More] could only run on that framework. What was required for .NET Framework 3.5 support? We could have used a custom implementation of WS-Discovery that works on .NET 3.5, but decided to create a simpler solution based on Client/Server Rendezvous on the LAN. One implication of this is that nvents for .NET 3.5 is not compatible with nvents for .NET 4.0 I haven't tested it but I do believe that the usage of NetDataContractSerializer already disables .NET 3.5 to .NET 4.0 serialization. Version 0.5 was a bug fixing release A WCF Timeout Exception issue was reported in version 0.4 and a fix was released within a couple of days. EventSubscription<TEvent> was added to use standard events using System; using Nvents; namespace NventsEventSubscriptionSample { class Program { static void Main(string[] args) { var fooEvents = new EventSubscription<FooEvent>(); fooEvents.Published += (s, e) => Console.WriteLine(e.Event.Bar); Events.Publish(new FooEvent { Bar = "FooBar" }); Console.ReadLine(); } } public class FooEvent : IEvent { public string Bar { get; set; } } } Download the latest version or view the nvents page. [Less]
Posted about 14 years ago by loraderon
Why was there no support for .NET 3.5 prior to nvents 0.6? To enable automatic discovery of all nvents clients we are using WCF Discovery which is a implementation of WS-Discovery. However, WCF Discovery is only supported by .NET 4.0 so nvents ... [More] could only run on that framework. What was required for .NET Framework 3.5 support? We could have used a custom implementation of WS-Discovery that works on .NET 3.5, but decided to create a simpler solution based on Client/Server Rendezvous on the LAN. One implication of this is that nvents for .NET 3.5 is not compatible with nvents for .NET 4.0 I haven't tested it but I do believe that the usage of NetDataContractSerializer already disables .NET 3.5 to .NET 4.0 serialization. Version 0.5 was a bug fixing release A WCF Timeout Exception issue was reported in version 0.4 and a fix was released within a couple of days. EventSubscription<TEvent> was added to use standard events using System; using Nvents; namespace NventsEventSubscriptionSample { class Program { static void Main(string[] args) { var fooEvents = new EventSubscription<FooEvent>(); fooEvents.Published += (s, e) => Console.WriteLine(e.Event.Bar); Events.Publish(new FooEvent { Bar = "FooBar" }); Console.ReadLine(); } } public class FooEvent : IEvent { public string Bar { get; set; } } } Download the latest version or view the nvents page. [Less]
Posted about 14 years ago by loraderon
Why was there no support for .NET 3.5 prior to nvents 0.6? To enable automatic discovery of all nvents clients we are using WCF Discovery which is a implementation of WS-Discovery. However, WCF Discovery is only supported by .NET 4.0 so nvents ... [More] could only run on that framework. What was required for .NET Framework 3.5 support? We could have used a custom implementation of WS-Discovery that works on .NET 3.5, but decided to create a simpler solution based on Client/Server Rendezvous on the LAN. One implication of this is that nvents for .NET 3.5 is not compatible with nvents for .NET 4.0 I haven't tested it but I do believe that the usage of NetDataContractSerializer already disables .NET 3.5 to .NET 4.0 serialization. Version 0.5 was a bug fixing release A WCF Timeout Exception issue was reported in version 0.4 and a fix was released within a couple of days. EventSubscription was added to use standard events using System; using Nvents; namespace NventsEventSubscriptionSample { class Program { static void Main(string[] args) { var fooEvents = new EventSubscription<FooEvent>(); fooEvents.Published += (s, e) => Console.WriteLine(e.Event.Bar); Events.Publish(new FooEvent { Bar = "FooBar" }); Console.ReadLine(); } } public class FooEvent : IEvent { public string Bar { get; set; } } } Download the latest version or view the nvents page. [Less]
Posted about 14 years ago by loraderon
Why was there no support for .NET 3.5 prior to nvents 0.6? To enable automatic discovery of all nvents clients we are using WCF Discovery which is a implementation of WS-Discovery. However, WCF Discovery is only supported by .NET 4.0 so nvents ... [More] could only run on that framework. What was required for .NET Framework 3.5 support? We could have used a custom implementation of WS-Discovery that works on .NET 3.5, but decided to create a simpler solution based on Client/Server Rendezvous on the LAN. One implication of this is that nvents for .NET 3.5 is not compatible with nvents for .NET 4.0 I haven't tested it but I do believe that the usage of NetDataContractSerializer already disables .NET 3.5 to .NET 4.0 serialization. Version 0.5 was a bug fixing release A WCF Timeout Exception issue was reported in version 0.4 and a fix was released within a couple of days. EventSubscription was added to use standard events using System; using Nvents; namespace NventsEventSubscriptionSample { class Program { static void Main(string[] args) { var fooEvents = new EventSubscription<FooEvent>(); fooEvents.Published += (s, e) => Console.WriteLine(e.Event.Bar); Events.Publish(new FooEvent { Bar = "FooBar" }); Console.ReadLine(); } } public class FooEvent : IEvent { public string Bar { get; set; } } } Download the latest version or view the nvents page. [Less]
Posted over 14 years ago by loraderon
How nvents handles subscribers Prior to version 0.4 nvents searched for subscribers and opened the connection to each server on every publish. Nvents 0.4 keeps the connections open and sends the publish event to known subscribers before searching ... [More] for more subscribers. This, of course, dramatically increases the performance. Automatic support for inheritance using System; using Nvents; namespace NventsInheritanceSample { class Program { static void Main(string[] args) { Events.Subscribe<ICustomerEvent>( e => Console.WriteLine("Something happend with customer {0}", e.CustomerId)); Events.Subscribe<CustomerAddedEvent>( e => Console.WriteLine("Customer {0} was added", e.CustomerId)); Events.Subscribe<CustomerChangedEvent>( e => Console.WriteLine("Customer {0} changed", e.CustomerId)); Events.Subscribe<CustomerNameChangedEvent>( e => Console.WriteLine("Customer {0} changed name from {1} to {2}", e.CustomerId, e.OldName, e.NewName)); Events.Publish(new CustomerNameChangedEvent { CustomerId = 1, OldName = "Old Name", NewName = "New Name" }); Events.Publish(new CustomerAddedEvent { CustomerId = 2 }); Console.ReadLine(); } } public interface ICustomerEvent : IEvent { int CustomerId { get; set; } } public class CustomerAddedEvent : ICustomerEvent { public int CustomerId { get; set; } } public class CustomerChangedEvent : ICustomerEvent { public int CustomerId { get; set; } } public class CustomerNameChangedEvent : CustomerChangedEvent { public string OldName { get; set; } public string NewName { get; set; } } } Will output the following statements Something happend with customer 1 Customer 1 changed Something happend with customer 2 Customer 1 changed name from Old Name to New Name Customer 2 was added [Less]
Posted over 14 years ago by loraderon
How nvents handles subscribers Prior to version 0.4 nvents searched for subscribers and opened the connection to each server on every publish. Nvents 0.4 keeps the connections open and sends the publish event to known subscribers before searching for ... [More] more subscribers. This, of course, dramatically increases the performance. Automatic support for inheritance using System; using Nvents; namespace NventsInheritanceSample { class Program { static void Main(string[] args) { Events.Subscribe<ICustomerEvent>( e => Console.WriteLine("Something happend with customer {0}", e.CustomerId)); Events.Subscribe<CustomerAddedEvent>( e => Console.WriteLine("Customer {0} was added", e.CustomerId)); Events.Subscribe<CustomerChangedEvent>( e => Console.WriteLine("Customer {0} changed", e.CustomerId)); Events.Subscribe<CustomerNameChangedEvent>( e => Console.WriteLine("Customer {0} changed name from {1} to {2}", e.CustomerId, e.OldName, e.NewName)); Events.Publish(new CustomerNameChangedEvent { CustomerId = 1, OldName = "Old Name", NewName = "New Name" }); Events.Publish(new CustomerAddedEvent { CustomerId = 2 }); Console.ReadLine(); } } public interface ICustomerEvent : IEvent { int CustomerId { get; set; } } public class CustomerAddedEvent : ICustomerEvent { public int CustomerId { get; set; } } public class CustomerChangedEvent : ICustomerEvent { public int CustomerId { get; set; } } public class CustomerNameChangedEvent : CustomerChangedEvent { public string OldName { get; set; } public string NewName { get; set; } } } Will output the following statements Something happend with customer 1 Customer 1 changed Something happend with customer 2 Customer 1 changed name from Old Name to New Name Customer 2 was added [Less]