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