示例#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;
 }
示例#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;
        }
示例#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();
        }
 public bool IsResponsibleFor(SourceBundle sourceBundle)
 {
     return Type == sourceBundle.Type;
 }
示例#5
0
 protected ContentLocator(SourceBundle sourceBundle)
 {
     SourceBundle = sourceBundle;
     ActualRunningState = RunningState.Stopped;
 }
示例#6
0
 public AgsContentLocator(SourceBundle sourceBundle)
     : base(sourceBundle)
 {
 }
示例#7
0
 internal static SourceBundle GetDemoSourceBundle(RecursivityPolicy policy)
 {
     var sourceBundle = new SourceBundle("ags", GetDemoSources(policy));
     return sourceBundle;
 }
示例#8
0
 public MxdContentLocator(SourceBundle sourceBundle)
     : base(sourceBundle, GetPredicate())
 {
 }
 public IContentLocator CreateContentLocator(SourceBundle sourceBundle)
 {
     return new AgsContentLocator(sourceBundle);
 }
示例#10
0
 public IContentLocator CreateContentLocator(SourceBundle sourceBundle)
 {
     return new NullContentLocator();
 }
示例#11
0
 public bool IsResponsibleFor(SourceBundle sourceBundle)
 {
     return false;
 }
示例#12
0
 public void LocateContent(SourceBundle sourceBundle)
 {
     //Do nothing;
 }