Example #1
0
        public static ITsWriter <object> CreateFor(Type type)
        {
            var iterType = type;
            ITsWriter <object> writer = null;

            while (iterType != null && !writersMap.TryGetValue(iterType, out writer))
            {
                iterType = iterType.BaseType;
            }

            if (writer == null)
            {
                throw new Exception($"Can't find writer for {type.Name}");
            }

            return(writer);
        }
Example #2
0
 public UntypedTsWriter(ITsWriter <T> actual)
 {
     this.actual = actual;
 }