本文整理汇总了C#中IDataService.GetData方法的典型用法代码示例。如果您正苦于以下问题:C# IDataService.GetData方法的具体用法?C# IDataService.GetData怎么用?C# IDataService.GetData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataService
的用法示例。
在下文中一共展示了IDataService.GetData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IDataService dataService)
{
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
// Report error here
return;
}
WelcomeTitle = item.Title;
});
_dataService.GetDefaultMailMessage(
(item, error) =>
{
if (error != null)
{
// Report error here
return;
}
MainMailMessage = item;
});
SendMainCommand = new RelayCommand(OnSendMail);
AboutMeCommand = new RelayCommand(OnAboutMe);
}
示例2: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IDataService dataService)
{
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
// Report error here
return;
}
WelcomeTitle = item.Title;
});
ConnectCommand = new RelayCommand(OnConnect, IsNeedConnect);
SendCommand = new RelayCommand(OnSend, CanSendMessage);
DisConnectCommand = new RelayCommand(OnDisConnect, IsNeedDisConnect);
var instanceContext = new InstanceContext(this);
var channel = new DuplexChannelFactory<IChatService>(instanceContext, "chartService");
_chatService = channel.CreateChannel();
Nickname = "frank";
MessageText = "Hello!";
RaiseCommandChanged();
}
示例3: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IDataService dataService)
{
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
// Report error here
return;
}
WelcomeTitle = item.Title;
});
_dataService.GetHello((o, e) =>
{
if (e != null)
{
Console.WriteLine(e.Message);
return;
}
MyMessage = o.Title;
});
}
示例4: CircleMenuSampleViewModel
/// <summary>
/// Initializes a new instance of the CircleMenuSampleViewModel class.
/// </summary>
public CircleMenuSampleViewModel(IDataService dataService)
{
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
// Report error here
return;
}
SubMenuItems = new ObservableCollection<CircleMenuItem>(
new List<CircleMenuItem>()
{
new CircleMenuItem() {Id = 1, Title = "衣"},
new CircleMenuItem() {Id = 2, Title = "带"},
new CircleMenuItem() {Id = 3, Title = "渐"},
new CircleMenuItem() {Id = 4, Title = "宽"},
new CircleMenuItem() {Id = 5, Title = "终"},
new CircleMenuItem() {Id = 6, Title = "不"},
new CircleMenuItem() {Id = 7, Title = "悔"},
new CircleMenuItem() {Id = 8, Title = "为"},
new CircleMenuItem() {Id = 9, Title = "伊"},
new CircleMenuItem() {Id = 10, Title = "消"},
new CircleMenuItem() {Id = 11, Title = "得"},
new CircleMenuItem() {Id = 12, Title = "人"},
new CircleMenuItem() {Id = 13, Title = "憔"},
new CircleMenuItem() {Id = 14, Title = "悴"}
});
});
}
示例5: MainPageViewModel
public MainPageViewModel()
{
_dataService = ServiceLocator.Current.GetInstance<IDataService>();
_navigationService = ServiceLocator.Current.GetInstance<INavigationService>();
NavigationService navService = _navigationService as NavigationService;
navService.Configure("RecipeDetailView", typeof(RecipeDetailView));
RecipeBox = _dataService.GetData();
OpenBoxCommand = new RelayCommand(OpenRecipeBox);
ShowRecipeDetailCommand = new RelayCommand<Recipe>(ShowRecipeDetail);
}
示例6: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IDataService dataService)
{
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
return;
}
WelcomeTitle = item.Title;
});
}
示例7: ShellViewModel
/// <summary>
/// Initializes a new instance of the ShellViewModel class.
/// </summary>
public ShellViewModel(IDataService dataService)
{
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
// Report error here
return;
}
WelcomeTitle = item.Title;
});
}
示例8: MainViewModel
public MainViewModel(IDataService dataService)
{
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
// Report error here
return;
}
_mensagem0 = item.Title;
_mensagem1 = item.Title;
});
}
示例9: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IDataService dataService)
{
_snmpService = new SnmpService();
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
// Report error here
return;
}
WelcomeTitle = item.Title;
});
}
示例10: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IDataService dataService)
{
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
// Report error here
return;
}
WelcomeTitle = item.Title;
});
_editorViewModel = new ViewModelLocator().Editor;
}
示例11: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IDataService dataService)
{
// Init data service
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
// Report error here
return;
}
_initializeData(item);
});
// Init in-between view model messenger
_initializeMessenger();
// Connecting window event with command
OnLoadedCommand = new RelayCommand(OnLoaded, () => true);
OnClosingCommand = new RelayCommand(OnClosing, () => true);
FileNewCommand = new RelayCommand(OnFileNew, () => true);
FileSaveCommand = new RelayCommand(OnFileSave, () => EditTextSavable);
EditText1_TextChangedCommand = new RelayCommand(OnEditText1_TextChanged, () => true);
EditHtml1_TextChangedCommand = new RelayCommand(OnEditHtml1_TextChanged, () => true);
FolderNewCommand = new RelayCommand(OnFolderNew, () => true);
FileRenameCommand = new RelayCommand(OnFileRename, () => true);
FileChangeExtensionTXTCommand = new RelayCommand(OnFileChangeExtensionTXT, () => true);
FileChangeExtensionHTMLCommand = new RelayCommand(OnFileChangeExtensionHTML, () => true);
SetAsRootCommand = new RelayCommand(OnSetAsRoot, () =>
CurrentExplorerNode != null &&
CurrentExplorerNode.ExplorerType == ExplorerType.Folder);
RunExplorerCommand = new RelayCommand(OnRunExplorer, () =>
CurrentExplorerNode != null &&
CurrentExplorerNode.ExplorerType == ExplorerType.Folder);
FileDeleteCommand = new RelayCommand(OnFileDelete, () => true);
FileExplorerRefreshCommand = new RelayCommand(OnFileExplorerRefresh, () => true);
HelpInfoCommand = new RelayCommand(OnHelpInfo, () => true);
FolderChangeCommand = new RelayCommand(OnFolderChange, () => true);
ExitCommand = new RelayCommand(OnExit, () => true);
SettingCommand = new RelayCommand(OnSetting, () => true);
EditHtmlCommand = new RelayCommand(OnEditHtml, () => true);
// Loading user preference
this._userPrefs = UserPreferences.Instance;
}
示例12: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IDataService dataService,ContactBook cb) {
_dataService = dataService;
_dataService.GetData(
(item, error) => {
if(error != null) {
// Report error here
return;
}
WelcomeTitle = item.Title;
});
_contactBook = cb;
_students = cb.Students;
EditCmd = new RelayCommand<Student>(edit, canEdit);
}
示例13: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IDataService dataService)
{
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
// Report error here
return;
}
DataSource = item;
RaisePropertyChanged("DataSource");
});
}
示例14: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IDataService dataService)
{
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
// Report error here
}
//WelcomeTitle = item.Title;
});
ButtonCommandPost = new RelayCommand(DoApiPost);
ButtonFileChooser = new RelayCommand(DoFileChooser);
QrCodeImage =
QrCodeUtility.GetQrCodeImage("Upload an image using this test client. This QR code will point to it.");
}
示例15: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IDataService dataService)
{
_dataService = dataService;
_dataService.GetData(
(item, error) =>
{
if (error != null)
{
// Report error here
return;
}
WelcomeTitle = "点击开始";
Area = "所在位置";
initgps = new RelayCommand<string>((x) => Executeinitgps(x));
});
}