示例#1
0
 public Module Read(Stream stream, String uri)
 {
     if (Log.IsDebugEnabled)
     {
         Log.Debug("Reading module from input stream");
     }
     return(EPLModuleUtil.ReadInternal(stream, uri));
 }
示例#2
0
 public DeploymentResult ReadDeploy(Stream stream, String moduleURI, String moduleArchive, Object userObject)
 {
     using (_iLock.Acquire())
     {
         var module = EPLModuleUtil.ReadInternal(stream, moduleURI);
         return(DeployQuick(module, moduleURI, moduleArchive, userObject));
     }
 }
示例#3
0
        public Module Read(FileInfo file)
        {
            var absolutePath = Path.GetFullPath(file.Name);

            Log.Debug("Reading resource '{0}'", absolutePath);

            using (var stream = File.OpenRead(absolutePath))
            {
                return(EPLModuleUtil.ReadInternal(stream, absolutePath));
            }
        }
示例#4
0
        public Module Read(Uri url)
        {
            Log.Debug("Reading resource from url: {0}", url);

            using (var webClient = new WebClient())
            {
                using (var stream = webClient.OpenRead(url))
                {
                    return(EPLModuleUtil.ReadInternal(stream, url.ToString()));
                }
            }
        }