示例#1
0
 protected SystemNodeCommand(NodeFlow Flow)
 {
     this.HostNode   = Flow.HostNode.NodeName;
     this.SourceNode = Flow.SourceNode.NodeName;
     this.TargetNode = Flow.TargetNode.NodeName;
     this.SpecName   = FormatSpecName(HostNode, SourceNode, TargetNode);
 }
示例#2
0
 Option <FilePath> InvokedTransfer(Option <FilePath> result, NodeFlow flow, SystemResourceUrn urn)
 {
     result.Map(
         file => C.Notify(Inform($"{flow.SourceNode}:{file.FileName} ==> {flow.TargetNode}")),
         () => C.Notify(result.Message));
     return(result);
 }
示例#3
0
 public Option <string> TransferFiles <S>(NodeFlow flow, string match = null)
     where S : CatalogSubject <S> =>
 Summarize(map(Items(Catalog.Subject <S>(), flow.SourceNode, match), urn => Self.TransferFile(flow, urn)));
示例#4
0
 Option <FilePath> INodeFileSystemChannel.TransferFile(NodeFlow flow, SystemResourceUrn urn)
 => InvokedTransfer(TransferFile(flow, urn), flow, urn);
示例#5
0
 Option <FilePath> TransferFile(NodeFlow flow, SystemResourceUrn urn)
 => from srcFile in Locator.UncFilePath(flow.SourceNode, urn)
 from dstFile in Locator.UncFilePath(flow.TargetNode, urn)
 from result in srcFile.CopyTo(dstFile)
 select result;