private static SinkDefinition GetSinkDefinition(MessageSink sink) { var definition = new SinkDefinition(); definition.Id = string.Format("sink{0}", DateTime.Now.Ticks); definition.Type = sink.GetType().AssemblyQualifiedName; LoadPropertyValues(definition, sink); return(definition); }
public MessageSink ResolveSink(string name) { SinkDefinition sink = Sinks[name]; TypeCreator creator = new TypeCreator(sink.Type); foreach (var formatterProperty in sink.Properties) { creator.MemberValues.Add(formatterProperty.Key, formatterProperty.Value); } return((MessageSink)creator.Create()); }