本文整理汇总了C#中ISyndicationExtension.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# ISyndicationExtension.GetType方法的具体用法?C# ISyndicationExtension.GetType怎么用?C# ISyndicationExtension.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISyndicationExtension
的用法示例。
在下文中一共展示了ISyndicationExtension.GetType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MatchByType
/// <summary>
/// Predicate delegate that returns a value indicating if the supplied <see cref="ISyndicationExtension"/>
/// represents the same <see cref="Type"/> as this <see cref="SyndicationExtension"/>.
/// </summary>
/// <param name="extension">The <see cref="ISyndicationExtension"/> to be compared.</param>
/// <returns><b>true</b> if the <paramref name="extension"/> is the same <see cref="Type"/> as this <see cref="SyndicationExtension"/>; otherwise, <b>false</b>.</returns>
/// <exception cref="ArgumentNullException">The <paramref name="extension"/> is a null reference (Nothing in Visual Basic).</exception>
public static bool MatchByType(ISyndicationExtension extension)
{
//------------------------------------------------------------
// Validate parameter
//------------------------------------------------------------
Guard.ArgumentNotNull(extension, "extension");
//------------------------------------------------------------
// Determine if search condition was met
//------------------------------------------------------------
return extension.GetType() == typeof (SDataHttpExtension);
}
示例2: MatchByType
/// <summary>
/// Predicate delegate that returns a value indicating if the supplied <see cref="ISyndicationExtension"/>
/// represents the same <see cref="Type"/> as this <see cref="SyndicationExtension"/>.
/// </summary>
/// <param name="extension">The <see cref="ISyndicationExtension"/> to be compared.</param>
/// <returns><b>true</b> if the <paramref name="extension"/> is the same <see cref="Type"/> as this <see cref="SyndicationExtension"/>; otherwise, <b>false</b>.</returns>
/// <exception cref="ArgumentNullException">The <paramref name="extension"/> is a null reference (Nothing in Visual Basic).</exception>
public static bool MatchByType(ISyndicationExtension extension)
{
//------------------------------------------------------------
// Validate parameter
//------------------------------------------------------------
Guard.ArgumentNotNull(extension, "extension");
//------------------------------------------------------------
// Determine if search condition was met
//------------------------------------------------------------
if (extension.GetType() == typeof(FeedRankSyndicationExtension))
{
return true;
}
else
{
return false;
}
}
示例3: MatchByType
/// <summary>
/// Predicate delegate that returns a value indicating if the supplied <see cref="ISyndicationExtension"/>
/// represents the same <see cref="Type"/> as this <see cref="MyCustomSyndicationExtension"/>.
/// </summary>
/// <param name="extension">The <see cref="ISyndicationExtension"/> to be compared.</param>
/// <returns><b>true</b> if the <paramref name="extension"/> is the same <see cref="Type"/> as this <see cref="MyCustomSyndicationExtension"/>; otherwise, <b>false</b>.</returns>
/// <exception cref="ArgumentNullException">The <paramref name="extension"/> is a null reference (Nothing in Visual Basic).</exception>
public static bool MatchByType(ISyndicationExtension extension)
{
Guard.ArgumentNotNull(extension, "extension");
//------------------------------------------------------------
// Determine if search condition was met
//------------------------------------------------------------
if (extension.GetType() == typeof(MyCustomSyndicationExtension))
{
return true;
}
else
{
return false;
}
}