本文整理汇总了C#中RubyRegex.GetPattern方法的典型用法代码示例。如果您正苦于以下问题:C# RubyRegex.GetPattern方法的具体用法?C# RubyRegex.GetPattern怎么用?C# RubyRegex.GetPattern使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RubyRegex
的用法示例。
在下文中一共展示了RubyRegex.GetPattern方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddDomainType
public static object AddDomainType(RubyContext/*!*/ context, BlockParam/*!*/ block, RubyModule/*!*/ self,
MutableString/*!*/ domainAndDate, RubyRegex/*!*/ typeRegex) {
if (block == null) {
throw RubyExceptions.NoBlockGiven();
}
MutableString tag = MutableString.Create("tag:").
Append(domainAndDate).Append(":").
Append(typeRegex.GetPattern());
RubyConstructor.AddExternalMultiConstructor(tag.ConvertToString(), block);
return null;
}
示例2: WriteRegex
private void WriteRegex(RubyRegex/*!*/ value) {
SubclassData instanceWriter = new SubclassData(this, value, typeof(RubyRegex));
_writer.Write((byte)'/');
WriteStringValue(value.GetPattern());
_writer.Write((byte)value.Options);
}
示例3: Inspect
public static MutableString/*!*/ Inspect(RubyRegex/*!*/ self) {
MutableString result = MutableString.CreateMutable();
result.Append('/');
AppendEscapeForwardSlash(result, self.GetPattern());
result.Append('/');
AppendOptionString(result, self.Options, true, true);
return result;
}
示例4: Source
public static MutableString/*!*/ Source(RubyRegex/*!*/ self) {
return self.GetPattern();
}
示例5: Append
private static MutableString/*!*/ Append(RubyRegex/*!*/ self, MutableString/*!*/ result) {
Assert.NotNull(self, result);
result.Append("(?");
if (AppendOptionString(result, self.Options, true, false) < 3) {
result.Append('-');
}
AppendOptionString(result, self.Options, false, false);
result.Append(':');
AppendEscapeForwardSlash(result, self.GetPattern());
result.Append(')');
return result;
}