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

C# Source类代码示例

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

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



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

示例1: ConvertNode

        public ConvertNode(Source source, CodeTreeNode child,
            CodeTreeNode type)
			    : base(source)
        {
            this.child = child;
            this.type = type;
        }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:7,代码来源:ConvertNode.cs


示例2: SourcePage

 public SourcePage(Source source)
     : this(source.UniqueId, source.Name, null, source.Order)
 {
     this.source = source;
     source.Properties.PropertyChanged += OnPropertyChanged;
     UpdateIcon ();
 }
开发者ID:haugjan,项目名称:banshee-hacks,代码行数:7,代码来源:SourcePage.cs


示例3: ErrorsSource

        public ErrorsSource(string name, Source source)
            : base(name, 50)
        {
            this.source = source;
            this.source.AddChildSource (this);

            scrolled_window = new ScrolledWindow();
            scrolled_window.ShadowType = ShadowType.In;
            scrolled_window.VscrollbarPolicy = PolicyType.Automatic;
            scrolled_window.HscrollbarPolicy = PolicyType.Automatic;

            view = new TreeView();

            scrolled_window.Add(view);
            scrolled_window.ShowAll();

            TreeViewColumn message_col = view.AppendColumn(Catalog.GetString("Message"),
                new CellRendererText(), "text", 0);
            TreeViewColumn file_col = view.AppendColumn(Catalog.GetString("File Name"),
                new CellRendererText(), "text", 1);

            message_col.Resizable = true;
            file_col.Resizable = true;

            store = new ListStore(typeof(string), typeof(string), typeof(Exception));
            view.Model = store;
        }
开发者ID:jrmuizel,项目名称:banshee-unofficial-plugins,代码行数:27,代码来源:ErrorsSource.cs


示例4: handleError

        /**
         * Handles an error.
         *
         * The behaviour of this method is defined by the
         * implementation. It may simply record the error message, or
         * it may throw an exception.
         */
        public void handleError(Source source, int line, int column,
					String msg)
        {
            errors++;
            print(source.getName() + ":" + line + ":" + column +
                ": error: " + msg);
        }
开发者ID:caomw,项目名称:CppNet,代码行数:14,代码来源:PreprocessorListener.cs


示例5: ILangErrorToken

 public ILangErrorToken(Source source, ILangErrorCode error, char current)
     : base(source)
 {
     TokenType = "error";
     Value = error;
     Text = current.ToString();
 }
开发者ID:isakkarlsson,项目名称:ILang,代码行数:7,代码来源:ILangErrorToken.cs


示例6: SubtractExpression

 public SubtractExpression(Source source, object a,
     object b)
         : base(source)
 {
     this.a = (Expression) a;
     this.b = (Expression) b;
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:7,代码来源:SubtractExpression.cs


示例7: MultiplyExpression

 public MultiplyExpression(Source source, object a,
     object b)
         : base(source)
 {
     this.a = (Expression) a;
     this.b = (Expression) b;
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:7,代码来源:MultiplyExpression.cs


示例8: DatabaseSource

 public DatabaseSource (string generic_name, string name, string id, int order, Source parent) : base (generic_name, name, order, id)
 {
     if (parent != null) {
         SetParentSource (parent);
     }
     DatabaseSourceInitialize ();
 }
开发者ID:mono-soc-2011,项目名称:banshee,代码行数:7,代码来源:DatabaseSource.cs


示例9: CreateOrUpdateOrganization

        public override void CreateOrUpdateOrganization(RmUnifyOrganization organization, Source source)
        {
            using (var context = new UsersContext())
            {
                // Get the school (if it exists)
                School school = (from s in context.Schools
                              where s.RmUnifyOrganizationId == organization.Id
                              select s).SingleOrDefault();

                if (school == null)
                {
                    // School does not exist - create
                    school = new School()
                    {
                        RmUnifyOrganizationId = organization.Id,
                        DisplayName = organization.Name
                    };
                    context.Schools.Add(school);
                    context.SaveChanges();
                }
                else
                {
                    // School exists - update
                    if (school.Deleted != null || school.RmUnifyOrganizationId != organization.Id)
                    {
                        school.Deleted = null;
                        school.RmUnifyOrganizationId = organization.Id;
                        context.SaveChanges();
                    }
                }
            }
        }
开发者ID:rmeducation,项目名称:rmUnifySdkForDotNet,代码行数:32,代码来源:CallbackApiImplementation.cs


示例10: ShouldNotMapFromStaticProperties

		public void ShouldNotMapFromStaticProperties()
		{
			Mapper.CreateMap<Source, Destination>();
			var source = new Source();
			Destination destination = Mapper.Map<Source, Destination>(source);
			Assert.NotEqual(100, destination.Static);
		}
开发者ID:erkanmaras,项目名称:OoMapper,代码行数:7,代码来源:MapFromFields.cs


示例11: DomainEventFunnel

        public DomainEventFunnel(object observable, Source.Of<object> observer)
        {
            this.observable = new WeakReference<object>(observable);
            this.observer = observer;

            GetDomainEventAddMethodsFrom(observable).ForEach(e => e.Invoke(observable, new object[] {observer}));
        }
开发者ID:pete-restall,项目名称:Ichnaea,代码行数:7,代码来源:DomainEventFunnel.cs


示例12: Pascal

        public Pascal(String operation, String filePath, String flags)
        {
            try{
                bool intermediate = flags.IndexOf('i') > 1;
                bool xref = flags.IndexOf('x') > 1;
                source = new Source(new StreamReader(filePath));
                source.AddMessageListener(new SourceMessageListener());

                parser = FrontEndFactory.CreateParser("pascal","top-down",source);
                parser.AddMessageListener(new ParserMessageListener());

                backend = BackendFactory.CreateBackend("compile");
                backend.AddMessageListener(new BackendMessageListener());

                parser.Parse();
                source.close();

                intermediateCode = parser.IntermediateCode;
                symbolTable = Parser.SymbolTable;

                backend.Process(intermediateCode,symbolTable);
            }
            catch(Exception ex){
                Console.WriteLine ("Internal translation error");
                Console.WriteLine (ex.StackTrace);
            }
        }
开发者ID:hardvain,项目名称:pascal-compiler,代码行数:27,代码来源:Pascal.cs


示例13: AssignExpression

 public AssignExpression(Source source, object to,
     object from)
         : base(source)
 {
     this.from = (Expression) from;
     this.to = (Expression) to;
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:7,代码来源:AssignExpression.cs


示例14: Instance_OnSourceChanged

 void Instance_OnSourceChanged(Source newSource)
 {
     if (newSource != m_currentSource)
     {
         Slide currentSlide = PresentationController.Instance.SelectedSlide;
         if (currentSlide == null)
             return;
         Display disp = currentSlide.DisplayList.Find(d => d.EquipmentType == m_Display.EquipmentType);
         if (disp == null)
             return;
         Window wnd = disp.WindowList.Where(x => x.Source == newSource).FirstOrDefault();
         if (wnd != null)
         {
             SelectedSource = new RectangleF(wnd.Left / (float)m_Display.Width, wnd.Top / (float)m_Display.Height, wnd.Width / (float)m_Display.Width, wnd.Height / (float)m_Display.Height);
             m_currentSource = wnd.Source;
         }
         else
         {
             SelectedSource = null;
             m_currentSource = null;
         }
         if (OnSourceSelected != null)
             OnSourceSelected();
     }
 }
开发者ID:AlexSneg,项目名称:VIRD-1.0,代码行数:25,代码来源:DisplayViewer.cs


示例15: WhenParseLiteralTokenFromAndSaveResultAs

 public void WhenParseLiteralTokenFromAndSaveResultAs(Source source, string key)
 {
     var parser = new LiteralTokenParser(Settings);
     var stream = new SourceStream(source);
     var result = parser.Parse(stream);
     ScenarioContext.Current.Set(result, key);
 }
开发者ID:Romfos,项目名称:Boost,代码行数:7,代码来源:TokenParserSteps.cs


示例16: highlightSourceAtLocation

        /// <summary>
        /// Render a helpful description of the location of the error in the GraphQL
        /// Source document.
        /// </summary>
        private static string highlightSourceAtLocation(Source source, SourceLocation location)
        {
            var line = location.Line;
            var prevLineNum = (line - 1).ToString();
            var lineNum = line.ToString();
            var nextLineNum = (line + 1).ToString();
            var padLen = nextLineNum.Length;
            var lines = _lineSplitter.Split(source.Body);
            var errorMessage = new StringBuilder();

            if (line >= 2)
            {
                errorMessage.AppendLine(prevLineNum.PadLeft(padLen, ' ') + ": " + lines[line - 2]);
            }
            else
            {
                errorMessage.AppendLine();
            }

            errorMessage.AppendLine(lineNum.PadLeft(padLen, ' ') + ": " + lines[line - 1]);
            errorMessage.AppendLine(new String(' ', padLen + location.Column) + "^");
            if (line < lines.Length)
            {
                errorMessage.AppendLine(nextLineNum.PadLeft(padLen, ' ') + ": " + lines[line]);
            }
            else
            {
                errorMessage.AppendLine();
            }

            return errorMessage.ToString();
        }
开发者ID:zhech2,项目名称:graphql-dotnet,代码行数:36,代码来源:SyntaxError.cs


示例17: EqualityExpression

 public EqualityExpression(Source source, object a,
     object b)
         : base(source)
 {
     this.a = (Expression) a;
     this.b = (Expression) b;
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:7,代码来源:EqualityExpression.cs


示例18: Reference

 public Reference(Source source, string name, string title, string chapter, string verse)
     : this(source, name)
 {
     this.title = title;
     this.chapter = chapter;
     this.verse = verse;
 }
开发者ID:elison22,项目名称:CS-Ponderizer,代码行数:7,代码来源:Reference.cs


示例19: CallExpression

 public CallExpression(Source source, object callable,
     object parameters)
         : base(source)
 {
     this.callable = (Expression) callable;
     this.parameters = (List<object>) parameters;
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:7,代码来源:CallExpression.cs


示例20: Should_use_passed_in_configuration

        public void Should_use_passed_in_configuration()
        {
            var source = new Source {Value = 5};
            var dest = Mapper.Map<Source, Dest>(source);

            dest.Value.ShouldEqual(source.Value);
        }
开发者ID:284247028,项目名称:AutoMapper,代码行数:7,代码来源:SeparateConfiguration.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# SourceCode类代码示例发布时间:2022-05-24
下一篇:
C# SoundType类代码示例发布时间: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