本文整理汇总了C#中Constant.IsNotNull方法的典型用法代码示例。如果您正苦于以下问题:C# Constant.IsNotNull方法的具体用法?C# Constant.IsNotNull怎么用?C# Constant.IsNotNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Constant
的用法示例。
在下文中一共展示了Constant.IsNotNull方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConstantProjectedSlot
/// <summary>
/// Creates a slot with constant value being <paramref name="value"/>.
/// </summary>
internal ConstantProjectedSlot(Constant value, MemberPath memberPath)
{
Debug.Assert(value != null);
Debug.Assert(value.IsNotNull() == false, "Cannot store NotNull in a slot - NotNull is only for conditions");
m_constant = value;
m_memberPath = memberPath;
}
示例2: ScalarRestriction
// <summary>
// Creates a scalar member restriction with the meaning "<paramref name="member" /> = <paramref name="value" />".
// This constructor is used for creating discriminator type conditions.
// </summary>
internal ScalarRestriction(MemberPath member, Constant value)
: base(new MemberProjectedSlot(member), value)
{
Debug.Assert(
value is ScalarConstant || value.IsNull() || value.IsNotNull(), "value is expected to be ScalarConstant, NULL, or NOT_NULL.");
}
示例3: ConstantProjectedSlot
// <summary>
// Creates a slot with constant value being <paramref name="value" />.
// </summary>
internal ConstantProjectedSlot(Constant value)
{
DebugCheck.NotNull(value);
Debug.Assert(value.IsNotNull() == false, "Cannot store NotNull in a slot - NotNull is only for conditions");
m_constant = value;
}