本文整理汇总了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;
}
示例2: SourcePage
public SourcePage(Source source)
: this(source.UniqueId, source.Name, null, source.Order)
{
this.source = source;
source.Properties.PropertyChanged += OnPropertyChanged;
UpdateIcon ();
}
示例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;
}
示例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);
}
示例5: ILangErrorToken
public ILangErrorToken(Source source, ILangErrorCode error, char current)
: base(source)
{
TokenType = "error";
Value = error;
Text = current.ToString();
}
示例6: SubtractExpression
public SubtractExpression(Source source, object a,
object b)
: base(source)
{
this.a = (Expression) a;
this.b = (Expression) b;
}
示例7: MultiplyExpression
public MultiplyExpression(Source source, object a,
object b)
: base(source)
{
this.a = (Expression) a;
this.b = (Expression) b;
}
示例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 ();
}
示例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();
}
}
}
}
示例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);
}
示例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}));
}
示例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);
}
}
示例13: AssignExpression
public AssignExpression(Source source, object to,
object from)
: base(source)
{
this.from = (Expression) from;
this.to = (Expression) to;
}
示例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();
}
}
示例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);
}