Exemplo n.º 1
0
 public IEnumerable<SourceBundle> ReadConfiguration(Uri uri)
 {
     var s = new SourceBundle("mxd",
                                  new List<Source>
                                  	{
                                  		new Source(
                                  			new Uri(
                                  				@"C:\Projects\_Esri2011\Workshop\src\ContentAdapter\ContentAdapter.Tests\TestData"),
                                  			RecursivityPolicy.Recursiv)
                                  	});
         yield return s;
         yield break;
 }
Exemplo n.º 2
0
        internal static SourceBundle GetMapDocumentConfigItemsForSingleFolderRecursiv()
        {
            var location = Assembly.GetExecutingAssembly().Location;
            var path = Path.GetDirectoryName(location);
            var filename = Path.Combine(path, @"TestData");

            var uri = new Uri(filename);

            var source = new Source(uri, RecursivityPolicy.Recursiv);
            var sourceBundle = new SourceBundle("mxd", new List<Source> { source });

            return sourceBundle;
        }
Exemplo n.º 3
0
        public IContentLocator ResolveContentLocator(SourceBundle sourceBundle)
        {
            foreach (var contentLocatorFilter in _contentLocatorFilters)
            {
                if (contentLocatorFilter.IsResponsibleFor(sourceBundle))
                {
                    var creator = contentLocatorFilter.ContentLocatorCreator;
                    return creator.CreateContentLocator(sourceBundle);
                }
            }

            // NullObject Pattern (http://en.wikipedia.org/wiki/Null_Object_pattern)
            return new NullContentLocator();
        }
Exemplo n.º 4
0
 public bool IsResponsibleFor(SourceBundle sourceBundle)
 {
     return Type == sourceBundle.Type;
 }
Exemplo n.º 5
0
 protected ContentLocator(SourceBundle sourceBundle)
 {
     SourceBundle = sourceBundle;
     ActualRunningState = RunningState.Stopped;
 }
Exemplo n.º 6
0
 public AgsContentLocator(SourceBundle sourceBundle)
     : base(sourceBundle)
 {
 }
Exemplo n.º 7
0
 internal static SourceBundle GetDemoSourceBundle(RecursivityPolicy policy)
 {
     var sourceBundle = new SourceBundle("ags", GetDemoSources(policy));
     return sourceBundle;
 }
Exemplo n.º 8
0
 public MxdContentLocator(SourceBundle sourceBundle)
     : base(sourceBundle, GetPredicate())
 {
 }
Exemplo n.º 9
0
 public IContentLocator CreateContentLocator(SourceBundle sourceBundle)
 {
     return new AgsContentLocator(sourceBundle);
 }
Exemplo n.º 10
0
 public IContentLocator CreateContentLocator(SourceBundle sourceBundle)
 {
     return new NullContentLocator();
 }
Exemplo n.º 11
0
 public bool IsResponsibleFor(SourceBundle sourceBundle)
 {
     return false;
 }
Exemplo n.º 12
0
 public void LocateContent(SourceBundle sourceBundle)
 {
     //Do nothing;
 }