public Visit ( |
||
document | ||
리턴 | Tp.Utils.Mime.MimeType[] |
public MimeTypes() { var reader = new MimeTypesReader(); Assembly assembly = Assembly.GetExecutingAssembly(); using (var stream = assembly.GetManifestResourceStream("Tp.Utils.Mime.mime-types.xml")) { if (stream == null) { throw new InvalidOperationException("Could not read resource"); } var document = new XmlDocument(); document.Load(stream); Add(reader.Visit(document)); } }
public MimeTypes() { var reader = new MimeTypesReader(); Assembly assembly = Assembly.GetExecutingAssembly(); using (var stream = assembly.GetManifestResourceStream("Tp.Utils.Mime.mime-types.xml")) { if (stream == null) { throw new InvalidOperationException("Could not read resource"); } var document = new XmlDocument(); document.Load(stream); Add(reader.Visit(document)); } }