public List <IDxfObject> AddDocument(IDxfDocument document) { Check.NotNull(document, nameof(document)); if (!_registry.ContainsKey(document)) { _registry.TryAdd(document, new List <IDxfObject>()); } return(_registry[document]); }
public IWriter CreateWriterSection(string sectionName, IDxfDocument document, TextWriter textWriter) { Check.NotNull(sectionName, nameof(sectionName)); Check.NotNull(document, nameof(document)); Check.NotNull(textWriter, nameof(textWriter)); var service = ServiceProvider.ResolveKeyed <IWriter, DxfSectionAttribute>(sectionName); service.SectionName = sectionName; service.Document = document; service.TextWriter = textWriter; return(service); }
public void AssignHandle(IDxfDocument document, IDxfObject o) { AddDocument(document).SetHandle(o).Add(o); }
public static void MapToDxf(this ILaserDocument document, IDxfDocument dxf, MapToDxfOption options = null) { options = options ?? new MapToDxfOption(); }