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


C# Source类代码示例

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


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


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