本文整理汇总了C#中ISource类的典型用法代码示例。如果您正苦于以下问题:C# ISource类的具体用法?C# ISource怎么用?C# ISource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISource类属于命名空间,在下文中一共展示了ISource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Convert
public Convert(LIRMethod parent, ISource source, LIRType sourceType, IDestination dest, LIRType destType) : base(parent, LIROpCode.Convert)
{
Source = source;
SourceType = sourceType;
Destination = dest;
DestinationType = destType;
}
示例2: CallIndirect
public CallIndirect(LIRMethod parent, ISource targetMethod, IEnumerable<ISource> sources = null, IDestination returnValueDest = null) : base(parent, LIROpCode.CallIndirect)
{
this.TargetMethod = targetMethod;
if (sources != null)
Sources.AddRange(sources);
this.ReturnValueDestination = returnValueDest;
}
示例3: GenerateSchema
/// <summary>
/// Generates a list of commands used to modify the source. If it does not exist prior, the
/// commands will create the source from scratch. Otherwise the commands will only add new
/// fields, tables, etc. It does not delete old fields.
/// </summary>
/// <param name="DesiredStructure">Desired source structure</param>
/// <param name="Source">Source to use</param>
/// <returns>List of commands generated</returns>
public IEnumerable<string> GenerateSchema(ISource DesiredStructure, ISourceInfo Source)
{
Contract.Requires<ArgumentNullException>(Source != null, "Source");
return SchemaGenerators.ContainsKey(Source.SourceType) ?
SchemaGenerators[Source.SourceType].GenerateSchema(DesiredStructure, Source) :
new List<string>();
}
示例4: AddToSourceLocations
public static void AddToSourceLocations(Object obj,ISource location)
{
var source = GetOrSet(obj);
if (source != null) {
source.Add(location);
}
}
示例5: Add
public SourceLocations Add(ISource source)
{
if (!m_sourcesByName.ContainsKey(source.SourceName)) {
m_sourcesByName.Add(source.SourceName,source);
}
return this;
}
示例6: GetSections
public IEnumerable<ISection> GetSections(ISource source)
{
var context = new Context
{
CurrentSource = source,
CurrentState = State.WhiteSpace,
CurrentPosition = SourcePosition.InitialPosition(),
CurrentText = string.Empty
};
char? prev = null;
ISection section = null;
foreach (var c in source.GetChars())
{
if (!prev.HasValue)
{
prev = c;
continue;
}
section = Analyze(prev, c, context);
if (section != null)
yield return section;
prev = c;
}
section = Analyze(prev, null, context);
if (section != null)
yield return section;
section = EndOfFileActions(context);
if (section != null)
yield return section;
}
示例7: HasAuthorization
public bool HasAuthorization(ISource aDoc)
{
//Check if user isn't set, or if he isn't creator or collaborator.
if (Context.Current.User == null || (!IsCreator(aDoc) && !IsCollaborator(aDoc)))
return false;
return true;
}
示例8: Load
/// <summary>
/// Loads a waves.bin file
/// </summary>
public override object Load( ISource source, LoadParameters parameters )
{
using ( Stream stream = ( ( IStreamSource )source ).Open( ) )
{
return WaveAnimation.Load( stream );
}
}
示例9: LoggingSourceDecorator
/// <summary>
/// Initializing constructor
/// </summary>
/// <param name="contained">Tracker source object whose calls are to be logged</param>
/// <param name="logWriter">TextWriter which will receive log output</param>
/// <param name="config">Configuration object for the LoggingSourceDecorator</param>
public LoggingSourceDecorator( ISource contained,
TextWriter logWriter,
LoggingSourceConfig config ) : base( contained )
{
_logWriter = logWriter;
_config = new LoggingSourceConfig( config );
}
示例10: FeedPropertiesDialog
public FeedPropertiesDialog(ISource f)
: base(WindowType.Toplevel)
{
feed = f;
Title = "\""+feed.Name+"\" Properties";
Icon = feed.Favicon;
BorderWidth = 5;
DeleteEvent += OnClose;
vbox = new VBox();
vbox.Spacing = 6;
Add(vbox);
notebook = new Notebook();
vbox.PackStart(notebook, false, false, 0);
bbox = new HButtonBox();
bbox.Layout = ButtonBoxStyle.End;
vbox.PackStart(bbox, false, false, 0);
AddGeneralTab();
AddTagsTab();
AddCloseButton();
}
示例11: Unary
public Unary(LIRMethod parent, ISource src, IDestination dest, UnaryOperation op, LIRType argType) : base(parent, LIROpCode.Unary)
{
Source = src;
Destination = dest;
Operation = op;
ArgumentType = argType;
}
示例12: Equals
public bool Equals(ISource other)
{
if (other == null) return false;
if (other == this) return true;
var ot = other as TextSource;
if (ot != null) { return ot.Content == this.Content; }
return false;
}
示例13: ModifierBase
protected ModifierBase(string type, PhaseCode startPhase, ISource source, ICardInPlay target, TimeScope duration, int value)
: base("Modifier", GetText(target, type, value), source)
{
this.StartPhase = startPhase;
this.Target = target;
this.Duration = duration;
this.Value = value;
}
示例14: CanLoad
/// <summary>
/// Returns true if the specified source can be loaded
/// </summary>
public override bool CanLoad( ISource source )
{
if ( source is IFolder )
{
return ( ( IFolder )source ).Contains( "*.md3" );
}
return source.HasExtension( "md3" );
}
示例15: TupleValue
public TupleValue(DataReference reference, int index)
{
var list = reference.Dereference();
Source = list as ISource;
Index = index;
}