public void RegisterTypeWriter(ITypeWriter writer) { Type type = writer.GetInputType(); if (this.typeWriters.ContainsKey(type)) { throw new ArgumentException(string.Format("A type writer is already registered for the type {0}", type)); } this.typeWriters.Add(type, writer); }