当前位置: 首页>>代码示例>>C#>>正文


C# IDataService.GetData方法代码示例

本文整理汇总了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);
        }
开发者ID:huoxudong125,项目名称:HQF.Tutorial.WCF,代码行数:33,代码来源:MainViewModel.cs

示例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();
        }
开发者ID:huoxudong125,项目名称:HQF.Tutorial.WCF,代码行数:28,代码来源:MainViewModel.cs

示例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;
            });
        }
开发者ID:azraelrabbit,项目名称:ova2exsi,代码行数:29,代码来源:MainViewModel.cs

示例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 = "悴"}
                        });
                });

        }
开发者ID:woniuchn,项目名称:blog_sample_codes,代码行数:36,代码来源:CircleMenuSampleViewModel.cs

示例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);
 }
开发者ID:CADTraveller,项目名称:RecipeMaster,代码行数:10,代码来源:MainPageViewModel.cs

示例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;
         }); 
 }
开发者ID:prabaprakash,项目名称:Visual-Studio-2013,代码行数:16,代码来源:MainViewModel.cs

示例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;
                });
        }
开发者ID:quocdev,项目名称:BingImageSearchApp,代码行数:18,代码来源:ShellViewModel.cs

示例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;

                });
        }
开发者ID:Weiderson,项目名称:lifeCycle,代码行数:16,代码来源:MainViewModel.cs

示例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;
                });
        }
开发者ID:jjjesus,项目名称:snmpboards,代码行数:19,代码来源:MainViewModel.cs

示例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;
        }
开发者ID:yushadowx,项目名称:WPFxFORM,代码行数:19,代码来源:MainViewModel.cs

示例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;
        }
开发者ID:damulhan,项目名称:MemoEditor,代码行数:50,代码来源:MainViewModel.cs

示例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);

        }
开发者ID:kaluluosi,项目名称:MVVMDialogService,代码行数:20,代码来源:MainViewModel.cs

示例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");
                });
        }
开发者ID:jamesmontemagno,项目名称:triconf-life-code,代码行数:20,代码来源:MainViewModel.cs

示例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.");
        }
开发者ID:Ekus,项目名称:MyPictures,代码行数:21,代码来源:MainViewModel.cs

示例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));

                });
        }
开发者ID:no10pc,项目名称:GPSLocation,代码行数:21,代码来源:MainViewModel.cs


注:本文中的IDataService.GetData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。