本文整理汇总了C#中ErlAtom.Matches方法的典型用法代码示例。如果您正苦于以下问题:C# ErlAtom.Matches方法的具体用法?C# ErlAtom.Matches怎么用?C# ErlAtom.Matches使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ErlAtom
的用法示例。
在下文中一共展示了ErlAtom.Matches方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ErlAtomTest
public void ErlAtomTest()
{
var am_test = new ErlAtom("test");
Assert.IsTrue(am_test.Equals(new ErlAtom("test")));
Assert.AreEqual(am_test, new ErlAtom("test"));
Assert.AreEqual("test", am_test.Value);
Assert.AreEqual("test", am_test.ToString());
Assert.IsTrue(am_test.IsScalar);
Assert.AreEqual(ErlTypeOrder.ErlAtom, am_test.TypeOrder);
Assert.IsTrue(am_test.Matches(new ErlAtom("test")));
Assert.AreEqual(new ErlVarBind(), am_test.Match(new ErlAtom("test")));
var am_Test = new ErlAtom("Test");
Assert.AreEqual("'Test'", am_Test.ToString());
Assert.AreEqual(4, am_Test.Length);
Assert.AreNotEqual(am_test, am_Test);
IErlObject temp = null;
Assert.IsFalse(am_test.Subst(ref temp, new ErlVarBind()));
Assert.IsTrue(am_Test.Visit(true, (acc, o) => acc));
Assert.DoesNotThrow(() => { var x = am_test.ValueAsObject; });
Assert.Throws<ErlIncompatibleTypesException>(() => { var x = am_test.ValueAsInt; });
Assert.Throws<ErlIncompatibleTypesException>(() => { var x = am_test.ValueAsLong; });
Assert.Throws<ErlIncompatibleTypesException>(() => { var x = am_test.ValueAsDecimal; });
Assert.Throws<ErlIncompatibleTypesException>(() => { var x = am_test.ValueAsDateTime; });
Assert.Throws<ErlIncompatibleTypesException>(() => { var x = am_test.ValueAsTimeSpan; });
Assert.Throws<ErlIncompatibleTypesException>(() => { var x = am_test.ValueAsDouble; });
Assert.DoesNotThrow(() => { var x = am_test.ValueAsString; });
Assert.DoesNotThrow(() => { var x = am_test.ValueAsBool; });
Assert.AreEqual('a', new ErlAtom("a").ValueAsChar);
Assert.Throws<ErlIncompatibleTypesException>(() => { var x = am_test.ValueAsByteArray; });
string s = am_test; // Implicit conversion
Assert.AreEqual("test", s);
ErlAtom a = "abc"; // Implicit conversion
Assert.AreEqual("abc", a.Value);
}