本文整理汇总了C#中Microsoft.JScript.Vsa.VsaEngine.GetOriginalRegExpConstructor方法的典型用法代码示例。如果您正苦于以下问题:C# VsaEngine.GetOriginalRegExpConstructor方法的具体用法?C# VsaEngine.GetOriginalRegExpConstructor怎么用?C# VsaEngine.GetOriginalRegExpConstructor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.JScript.Vsa.VsaEngine
的用法示例。
在下文中一共展示了VsaEngine.GetOriginalRegExpConstructor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToRegExpObject
private static RegExpObject ToRegExpObject(object regExp, VsaEngine engine)
{
if ((regExp == null) || (regExp is Missing))
{
return (RegExpObject) engine.GetOriginalRegExpConstructor().Construct("", false, false, false);
}
RegExpObject obj2 = regExp as RegExpObject;
if (obj2 != null)
{
return obj2;
}
Regex regex = regExp as Regex;
if (regex != null)
{
return new RegExpObject(regex);
}
return (RegExpObject) engine.GetOriginalRegExpConstructor().Construct(Microsoft.JScript.Convert.ToString(regExp), false, false, false);
}
示例2: ToRegExpObject
private static RegExpObject ToRegExpObject(Object regExp, VsaEngine engine){
if (regExp == null || regExp is Missing)
return (RegExpObject)engine.GetOriginalRegExpConstructor().Construct("", false, false, false);
RegExpObject result = regExp as RegExpObject;
if (result != null) return result;
Regex regex = regExp as Regex;
if (regex != null) return new RegExpObject(regex);
return (RegExpObject)engine.GetOriginalRegExpConstructor().Construct(Convert.ToString(regExp), false, false, false);
}