本文整理汇总了C#中Source.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# Source.GetType方法的具体用法?C# Source.GetType怎么用?C# Source.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Source
的用法示例。
在下文中一共展示了Source.GetType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Instance_OnSourceChanged
void Instance_OnSourceChanged(Source newSource)
{
_source = newSource;
if (newSource != null)
{
_playerModule = Domain.PresentationShow.ShowClient.ShowClient.Instance.GetPlayerModule(newSource.GetType());
}
FillCommandList();
FireListChanged();
}
示例2: ShouldStoreProperties
public void ShouldStoreProperties()
{
var source = new Source();
var target = new Target();
var sourceProperty = source.GetType().GetProperty("Text");
var targetProperty = target.GetType().GetProperty("MyText");
var handler = new SyncValueToHandler<Source>(m => m.Text, source, target);
handler.SourceProperty.ShouldBe(sourceProperty);
handler.TargetProperty.ShouldBe(targetProperty);
handler.TargetInstance.ShouldBe(target);
handler.SourceInstance.ShouldBe(source);
}
示例3: GetSourceString
private string GetSourceString (Source src)
{
if (src == null)
return null;
var parent = src.Parent;
if (parent == null) {
return src.GetType ().ToString ();
} else {
return String.Format ("{0}/{1}", parent.GetType (), src.GetType ());
}
}
示例4: Supports
public override bool Supports (Source source)
{
// This is lame but I'm too lazy to tell upstream to provide a .pc
// for Banshee.NowPlaying.
return source.GetType().Name == "NowPlayingSource";
}