Example #1
0
 public TagLibParserFactory(TagLibForParsing lib, ExpressionLib expressionLib, IResourceLocatorFactory factory, ITagValidator tagValidator)
 {
     _lib           = lib;
     _expressionLib = expressionLib;
     _factory       = factory;
     _tagValidator  = tagValidator;
 }
Example #2
0
 public TagLibParserFactory(TagLibForParsing lib, ExpressionLib expressionLib, IResourceLocatorFactory factory, ITagValidator tagValidator)
 {
     _lib = lib;
     _expressionLib = expressionLib;
     _factory = factory;
     _tagValidator = tagValidator;
 }
Example #3
0
 protected void InitFactory(Assembly assembly)
 {
     if (_factory == null)
     {
         _assembly = assembly;
         Type   factoryType = null;
         String prefix      = null;
         try
         {
             var config = TilesConfigurationSection.Get();
             factoryType = config.ResourceFactoryType;
             prefix      = config.FilePrefix;
             RefreshJob.REFRESH_INTERVAL = config.RefreshIntervalSeconds;
         }
         catch
         {
             Debug.WriteLine("No config section found for tiles, using assembly configuration");
         }
         _factory = factoryType == null
                        ?
                    new AssemblyLocatorFactory(_assembly, prefix).CloneForTagLib(_lib)
                        :
                    TileXmlConfigurator.GetCustomFactory(_lib, factoryType);
     }
 }
 public RefreshableResourceTemplate(IResourceLocator locator, IResourceLocatorFactory factory, string name)
 {
     _name = name;
     _locator = locator;
     _factory = factory;
     LoadResource();
 }
Example #5
0
 public RefreshableResourceTemplate(IResourceLocator locator, IResourceLocatorFactory factory, string name)
 {
     _name    = name;
     _locator = locator;
     _factory = factory;
     LoadResource();
 }
Example #6
0
 public ResourceTemplate(ITagLib lib, IResourceLocator resource, IResourceLocatorFactory factory, string path)
 {
     _lib = lib;
     _path = path;
     _resource = resource;
     _factory = factory;
     Load();
 }
Example #7
0
 public ResourceTemplate(ITagLib lib, IResourceLocator resource, IResourceLocatorFactory factory, string path)
 {
     _lib      = lib;
     _path     = path;
     _resource = resource;
     _factory  = factory;
     Load();
 }
 public AbstractTagLibParser(TagLibForParsing lib, ExpressionLib expressionLib, ParseHelper helper, IResourceLocator locator, IResourceLocatorFactory factory, ITagValidator tagValidator)
 {
     _lib = lib;
     _expressionLib = expressionLib;
     _helper = helper;
     _locator = locator;
     _factory = factory;
     _tagValidator = tagValidator;
 }
 public AbstractTagLibParser(TagLibForParsing lib, ExpressionLib expressionLib, ParseHelper helper, IResourceLocator locator, IResourceLocatorFactory factory, ITagValidator tagValidator)
 {
     _lib           = lib;
     _expressionLib = expressionLib;
     _helper        = helper;
     _locator       = locator;
     _factory       = factory;
     _tagValidator  = tagValidator;
 }
Example #10
0
 protected void InitFactory(Assembly assembly)
 {
     if (_factory == null)
     {
         _assembly = assembly;
         Type factoryType = null;
         String prefix = null;
         try
         {
             var config = TilesConfigurationSection.Get();
             factoryType = config.ResourceFactoryType;
             prefix = config.FilePrefix;
             RefreshJob.REFRESH_INTERVAL = config.RefreshIntervalSeconds;
         }
         catch
         {
             Debug.WriteLine("No config section found for tiles, using assembly configuration");
         }
         _factory = factoryType == null
                        ?
                            new AssemblyLocatorFactory(_assembly, prefix).CloneForTagLib(_lib)
                        :
                            TileXmlConfigurator.GetCustomFactory(_lib,factoryType);
     }
 }
 public StrictResolveTagLibParser(TagLibForParsing lib, ExpressionLib expressionLib, ParseHelper helper, IResourceLocator locator, IResourceLocatorFactory factory, ITagValidator tagValidator)
     : base(lib, expressionLib, helper, locator, factory, tagValidator)
 {
 }
Example #12
0
 public Formatter SetLocatorFactory(IResourceLocatorFactory locatorFactory)
 {
     _locatorFactory = locatorFactory;
     return this;
 }
Example #13
0
 public TileXmlConfigurator(ITagLib lib, IResourceLocatorFactory factory)
 {
     _factory = factory.CloneForTagLib(lib);
     Load();
 }
Example #14
0
 public FileTemplate(IResourceLocator locator, IResourceLocatorFactory factory, string path)
     : base(locator, factory, System.IO.Path.GetFullPath(path))
 {
 }
Example #15
0
 public FileTemplate(IResourceLocator locator, IResourceLocatorFactory factory, string path)
     : base(locator, factory, System.IO.Path.GetFullPath(path))
 {
 }
 public RelaxedResolveTagLibParser(TagLibForParsing lib, ExpressionLib expressionLib,ParseHelper helper, IResourceLocator locator, IResourceLocatorFactory factory, ITagValidator tagValidator)
     : base(lib, expressionLib, helper, locator,factory,tagValidator)
 {
 }
Example #17
0
 public Formatter SetLocatorFactory(IResourceLocatorFactory locatorFactory)
 {
     _locatorFactory = locatorFactory;
     return(this);
 }
Example #18
0
        public static Formatter LocatorBasedFormatter(ITagLib lib, string path, IResourceLocator locator, IResourceLocatorFactory factory)
        {
            var template = locator.GetDataAsString(path);

            return(new Formatter(template).
                   OverrideLib(lib).
                   OverrideExpressionLib(factory.ExpressionLib).
                   AllowTags(true).
                   SetLocatorFactory(factory).
                   SetInitialLocator(locator.Update(path)).
                   SetTagValidator(CreateTagValidatorFor(lib)).
                   Parse());
        }
Example #19
0
 public static Formatter LocatorBasedFormatter(ITagLib lib, string path, IResourceLocator locator, IResourceLocatorFactory factory)
 {
     var template = locator.GetDataAsString(path);
     return new Formatter(template).
                 OverrideLib(lib).
                 OverrideExpressionLib(factory.ExpressionLib).
                 AllowTags(true).
                 SetLocatorFactory(factory).
                 SetInitialLocator(locator.Update(path)).
                 SetTagValidator(CreateTagValidatorFor(lib)).
                 Parse();
 }
 public TileXmlConfigurator(ITagLib lib, IResourceLocatorFactory factory)
 {
     _factory = factory.CloneForTagLib(lib);
     Load();
 }
Example #21
0
 public TilesFactory(IResourceLocatorFactory factory)
 {
     _map     = new TilesMap();
     _factory = factory;
 }
Example #22
0
 public TilesFactory(IResourceLocatorFactory factory)
 {
     _map = new TilesMap();
     _factory = factory;
 }