Example #1
0
        ApiCodeBlock LoadBlock(ApiHexRow src)
        {
            if (src.Uri.IsEmpty)
            {
                Wf.Warn(string.Format("The operation uri for method based at {0} is empty", src.Address));
            }

            return(new ApiCodeBlock(src.Address, src.Uri, src.Data));
        }
Example #2
0
        public Index <ApiCodeBlock> Read(ApiHostUri host)
        {
            var file = FS.file(host.Part, host.HostName, Ext);
            var path = Paths().Where(f => f.FileName.Name == file.Name).FirstOrDefault(FS.FilePath.Empty);

            if (path.IsEmpty)
            {
                Wf.Warn(Msg.HostFileMissing.Format(host, path));
                return(sys.empty <ApiCodeBlock>());
            }
            var flow = Wf.Running(path);
            var data = Read(path);

            Wf.Ran(flow, data.Length);
            return(data);
        }