本文整理匯總了C#中MindTouch.Dream.Plug.GetAsync方法的典型用法代碼示例。如果您正苦於以下問題:C# Plug.GetAsync方法的具體用法?C# Plug.GetAsync怎麽用?C# Plug.GetAsync使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MindTouch.Dream.Plug
的用法示例。
在下文中一共展示了Plug.GetAsync方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: RemoteInstanceManager
// --- Constructors ---
public RemoteInstanceManager(DekiWikiService dekiService, XUri directoryUri) : base(dekiService) {
_directory = Plug.New(directoryUri);
DreamMessage testMsg = _directory.GetAsync().Wait();
if (!testMsg.IsSuccessful)
throw new DreamInternalErrorException(string.Format("Error validating remote deki portal service at '{0}'", directoryUri.ToString()));
}
示例2: RemoteInstanceManager
//--- Constructors ---
public RemoteInstanceManager(DekiWikiService dekiService, TaskTimerFactory timerFactory, XUri directoryUri, string tempPath) : base(dekiService, timerFactory) {
// validate temp folder
_tempPath = tempPath;
if(!Directory.Exists(_tempPath)) {
throw new ArgumentException("temp folder does not exist", "tempPath");
}
// check remote directory
_directory = Plug.New(directoryUri);
var testMsg = _directory.GetAsync().Wait();
if(!testMsg.IsSuccessful) {
_log.WarnFormat("Error validating remote deki portal service at '{0}'", directoryUri);
}
}