• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ValueWrapper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ValueWrapper的典型用法代码示例。如果您正苦于以下问题:C# ValueWrapper类的具体用法?C# ValueWrapper怎么用?C# ValueWrapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ValueWrapper类属于命名空间,在下文中一共展示了ValueWrapper类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: IfNull

 public IfNull(
      object firstValue, ValueObjectType firstValueType,
      object secondValue, ValueObjectType secondValueType)
 {
     this.Value1 = new ValueWrapper(firstValue, firstValueType);
     this.Value2 = new ValueWrapper(secondValue, secondValueType);
 }
开发者ID:danielgindi,项目名称:dg.Sql,代码行数:7,代码来源:IfNull.cs


示例2: GroupConcat

 public GroupConcat(bool distinct, ValueWrapper value, string separator, OrderByList orderBy)
 {
     this.Distinct = distinct;
     this.Value = value;
     this.Separator = separator;
     this.OrderBy = orderBy;
 }
开发者ID:danielgindi,项目名称:dg.Sql,代码行数:7,代码来源:GroupConcat.cs


示例3: Add

 public Add(
     object value1, ValueObjectType valueType1,
     object value2, ValueObjectType valueType2)
 {
     this.Value1 = new ValueWrapper(value1, valueType1);
     this.Value2 = new ValueWrapper(value2, valueType2);
 }
开发者ID:danielgindi,项目名称:dg.Sql,代码行数:7,代码来源:Add.cs


示例4: Divide

 public Divide(
     object value1,
     object value2
     )
 {
     this.Value1 = new ValueWrapper(value1, ValueObjectType.Value);
     this.Value2 = new ValueWrapper(value2, ValueObjectType.Value);
 }
开发者ID:danielgindi,项目名称:dg.Sql,代码行数:8,代码来源:Divide.cs


示例5: OnException

        private bool OnException(object sender, Exception ex)
        {
            var result = new ValueWrapper<bool>(false);

            if (Exception != null) Exception(sender, new EventArgs<Exception, ValueWrapper<bool>>(ex, result));

            return result.Value;
        }
开发者ID:A-n-d-r-e-y,项目名称:VISLAB,代码行数:8,代码来源:AsyncExceptionHandler.cs


示例6: Multiply

 public Multiply(
     object value1,
     object value2
     )
 {
     this.Value1 = new ValueWrapper(value1, ValueObjectType.Value);
     this.Value2 = new ValueWrapper(value2, ValueObjectType.Value);
 }
开发者ID:danielgindi,项目名称:dg.Sql,代码行数:8,代码来源:Multiply.cs


示例7: Replace

 public Replace(
     object source, ValueObjectType sourceType,
     string searchTableName, string searchColumn,
     string replaceWithTableName, string replaceWithColumn)
 {
     this.SourceValue = new ValueWrapper(source, sourceType);
     this.SearchValue = new ValueWrapper(searchTableName, searchColumn);
     this.ReplaceWithValue = new ValueWrapper(replaceWithTableName, replaceWithColumn);
 }
开发者ID:danielgindi,项目名称:dg.Sql,代码行数:9,代码来源:Replace.cs


示例8: OperationsViewModel

        public OperationsViewModel(IUnityContainer unityContainer, IInitData initData, ISettingsService settingsService)
        {
            InitData = initData;
            SettingsService = settingsService;
            IsOperationsViewEnabled = true;
            IsCancellationRequested = new ValueWrapper<bool>(false);
            GenerateDataGrid();

            UnityContainer = unityContainer;
        }
开发者ID:Tranzystor,项目名称:GusDownloader,代码行数:10,代码来源:OperationsViewModel.cs


示例9: when_TryGetValue_called_with_nonexistent_key__should_return_false

        public void when_TryGetValue_called_with_nonexistent_key__should_return_false()
        {
            var mruCache = new MruCache<ValueWrapper<int>, object>(12);

            object added = new object();
            var key = new ValueWrapper<int>(0);

            mruCache.Add(key, added);

            object res;
            Assert.IsFalse(mruCache.TryGetValue(new ValueWrapper<int>(1), out res));
            Assert.IsNull(res);
        }
开发者ID:percramer,项目名称:pjsip4net,代码行数:13,代码来源:given_a_mruCache.cs


示例10: when_TryGetValue_called_with_existing_key__should_return_what_it_was_provided

        public void when_TryGetValue_called_with_existing_key__should_return_what_it_was_provided()
        {
            var mruCache = new MruCache<ValueWrapper<int>, object>(12);

            object added = new object();
            var key = new ValueWrapper<int>(0);

            mruCache.Add(key, added);

            object res;
            Assert.IsTrue(mruCache.TryGetValue(new ValueWrapper<int>(0), out res));
            Assert.AreEqual(added, res);
        }
开发者ID:percramer,项目名称:pjsip4net,代码行数:13,代码来源:given_a_mruCache.cs


示例11: AnalyzeAllPDFs

        public IEnumerable<IRowModel> AnalyzeAllPDFs(IEnumerable<IRowModel> filesToAnalyze, string[] wordsToAnalysis, string sourceFolder,
            ValueWrapper<bool> isCancellationRequested, ReportProgessEvent reportProgress)
        {
            foreach (var file in filesToAnalyze)
            {
                if (isCancellationRequested.Value)
                {
                    return filesToAnalyze;
                }

                try
                {
                    if (file.Descriptions.Any())
                    {
                        file.Descriptions.Clear();
                    }

                    var dms = wordsToAnalysis.Select(x => new DescriptionModel {Word = x, Occurances = 0});
                    foreach (var descriptionModel in dms)
                    {
                        file.Descriptions.Add(descriptionModel);
                    }

                    var pdfReader = new PdfReader(Path.Combine(sourceFolder, file.FileName));
                    string text = string.Empty;
                    int numberOfPages = pdfReader.NumberOfPages;
                    for (int page = 1; page < numberOfPages; page++)
                    {
                        text = PdfTextExtractor.GetTextFromPage(pdfReader, page);
                        foreach (var word in file.Descriptions)
                        {
                            word.Occurances += Regex.Matches(text, word.Word).Count;
                        }
                    }
                    file.Analyzed = true;
                    pdfReader.Close();
                }
                catch (Exception)
                {
                    continue;
                }
                if (OnFileAnalyzed != null)
                {
                    OnFileAnalyzed.Invoke(file);
                }
            }

            return filesToAnalyze;
        }
开发者ID:Tranzystor,项目名称:GusDownloader,代码行数:49,代码来源:AnalyzerService.cs


示例12: DownloadFiles

        public void DownloadFiles(IEnumerable<Uri> links, string destinationPath, ReportProgessEvent reportProgess, ValueWrapper<bool> isCancellationRequested)
        {
            var client = new WebClient();
            var linksList = links.ToList();
            int counter = 0;
            string filename;
            foreach (var link in linksList)
            {
                if (isCancellationRequested.Value)
                {
                    return;
                }
                filename = Path.GetFileName(link.LocalPath);

                reportProgess(counter++*100/linksList.Count);

                try
                {
                    client.DownloadFile(link, filename);
                    Thread.Sleep(500);
                }
                catch (Exception)
                {
                    //zakladam ze wsyzstkie pliki sie pobiora bez przypalow.
                }
                var path = Path.Combine(destinationPath, filename);
                if (File.Exists(path))
                {
                    File.Delete(path);
                }
                File.Copy(filename, path);

                if (OnFileDownloaded != null)
                {
                    OnFileDownloaded.Invoke(path);
                }
            }
        }
开发者ID:Tranzystor,项目名称:GusDownloader,代码行数:38,代码来源:DownloadService.cs


示例13: SceneManager

        /// <summary>
        /// The default Constructor.
        /// </summary>
        public SceneManager(GameWindow gameWindow, Camera camera, FontLibrary fontLibrary, string fontPath, IDirectoryHandler directoryHandler, IGameSettings gameSettings, ValueWrapper<bool> debug)
        {
            GameWindow = gameWindow;
            SceneList = new List<Scene>();
            _scenesToAdd = new List<Scene>();
            _scenesToRemove = new List<Scene>();

            Directories = directoryHandler;

            FontPath = fontPath;
            GameFontLibrary = fontLibrary;
            DefaultFont = GameFontLibrary.GetFirstOrDefault(GameFontType.Default);
            FontDrawing = new QFontDrawing();
            FontDrawing.ProjectionMatrix = camera.ScreenProjectionMatrix;

            ScreenCamera = camera;
            ScreenCamera.Center = Vector2.Zero;
            ScreenCamera.MaximumScale = new Vector2(10000, 10000);

            GameSettings = gameSettings;

            Debug = debug;
        }
开发者ID:opcon,项目名称:Substructio,代码行数:26,代码来源:SceneManager.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Values类代码示例发布时间:2022-05-24
下一篇:
C# ValueType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap