public TagLib(TagLibMode mode=TagLibMode.Strict) { Mode = mode; Register(new Core()); Register(new Format()); Register(new Xml()); }
public TagLib(TagLibMode mode = TagLibMode.Strict) { Mode = mode; Register(new Core()); Register(new Format()); Register(new Xml()); }
public TagLib(TagLibMode mode,params ITagGroup[] groups) { Mode = mode; foreach (var group in groups) { Register(group); } }
public TagLib(TagLibMode mode, params ITagGroup[] groups) { Mode = mode; foreach (var group in groups) { Register(group); } }
public Formatter SwitchToMode(TagLibMode mode) { if (_templateParsed != null) { throw new InvalidOperationException("SwitchToMode can only be called before calling Parse!"); } var lib = new TagLib(mode, _lib.ToArray()); _lib = lib; return(this); }
public static Formatter FileBasedFormatter(string path, TagLibMode mode, ITagLib lib = null) { var locator = new FileBasedResourceLocator(); return(new Formatter(locator.GetDataAsString(path)). OverrideLib(lib). AllowTags(true). SetLocatorFactory(new FileLocatorFactory()). SetInitialLocator(locator.Update(path)). SwitchToMode(mode). SetTagValidator(CreateTagValidatorFor(lib)). Parse()); }
public static Formatter FileBasedFormatter(string path, TagLibMode mode, ITagLib lib=null) { var locator = new FileBasedResourceLocator(); return new Formatter(locator.GetDataAsString(path)). OverrideLib(lib). AllowTags(true). SetLocatorFactory(new FileLocatorFactory()). SetInitialLocator(locator.Update(path)). SwitchToMode(mode). SetTagValidator(CreateTagValidatorFor(lib)). Parse(); }
public Formatter SwitchToMode(TagLibMode mode) { if (_templateParsed != null) throw new InvalidOperationException("SwitchToMode can only be called before calling Parse!"); var lib=new TagLib(mode,_lib.ToArray()); _lib = lib; return this; }