public bool IsInvokable(ISource source, string arguments) { var sourcePath = SourceLocator.GetTargetLocation(source.Location); if (SourceLocator.IsLocalPathLocation(source.Location)) { return(File.Exists(sourcePath)); } if (SourceLocator.IsFileEntityLocation(source.Location)) { using (var context = new Context()) { return(context.EmbeddedBlobs.Any(b => b.Name == sourcePath)); } } throw new NotImplementedException(@"Source location " + source.Location + " not implemented yet."); }