コード例 #1
0
ファイル: ClrNameOps.cs プロジェクト: Catweazle/ironruby
 public static MutableString/*!*/ Inspect(ClrName/*!*/ self) {
     return ClrString.Inspect(self.MangledName);
 }
コード例 #2
0
ファイル: ClrNameOps.cs プロジェクト: Catweazle/ironruby
 public static MutableString/*!*/ Dump(ClrName/*!*/ self) {
     return ClrString.Dump(self.MangledName);
 }
コード例 #3
0
ファイル: ClrNameOps.cs プロジェクト: Catweazle/ironruby
 public static int Compare(ClrName/*!*/ self, [NotNull]MutableString/*!*/ other) {
     // TODO: do not create MS
     return -Math.Sign(other.CompareTo(MutableString.Create(self.MangledName, RubyEncoding.UTF8)));
 }
コード例 #4
0
ファイル: ClrNameOps.cs プロジェクト: TerabyteX/main
 public static MutableString GetClrName(RubyContext/*!*/ context, ClrName/*!*/ self)
 {
     return MutableString.Create(self.ActualName, context.GetIdentifierEncoding());
 }
コード例 #5
0
ファイル: ClrNameOps.cs プロジェクト: Catweazle/ironruby
 public static bool IsEqual(ClrName/*!*/ self, [NotNull]MutableString/*!*/ other) {
     return self.MangledName == other.ConvertToString();
 }
コード例 #6
0
ファイル: ClrNameOps.cs プロジェクト: Catweazle/ironruby
 public static int Compare(ClrName/*!*/ self, [DefaultProtocol, NotNull]string/*!*/ other) {
     return Math.Sign(self.MangledName.CompareTo(other));
 }
コード例 #7
0
ファイル: ClrNameOps.cs プロジェクト: ExpertsInside/IronSP
 public static int GetLength(ClrName/*!*/ self) {
     return self.MangledName.Length;
 }
コード例 #8
0
ファイル: ClrNameOps.cs プロジェクト: Catweazle/ironruby
 public static SymbolId ToSymbol(ClrName/*!*/ self) {
     return SymbolTable.StringToId(self.MangledName);
 }
コード例 #9
0
ファイル: ClrNameOps.cs プロジェクト: ExpertsInside/IronSP
 public static bool IsEmpty(ClrName/*!*/ self) {
     return self.MangledName.Length == 0;
 }
コード例 #10
0
ファイル: ClrNameOps.cs プロジェクト: ExpertsInside/IronSP
 public static RubyEncoding/*!*/ GetEncoding(ClrName/*!*/ self) {
     return RubyEncoding.UTF8;
 }
コード例 #11
0
ファイル: ClrNameOps.cs プロジェクト: ExpertsInside/IronSP
 public static object Match(BinaryOpStorageWithScope/*!*/ storage, RubyScope/*!*/ scope, ClrName/*!*/ self, [DefaultProtocol, NotNull]MutableString/*!*/ pattern) {
     return MutableStringOps.Match(storage, scope, GetRubyName(scope.RubyContext, self), pattern);
 }
コード例 #12
0
ファイル: ClrNameOps.cs プロジェクト: ExpertsInside/IronSP
 public static object Match(BinaryOpStorageWithScope/*!*/ storage, RubyScope/*!*/ scope, ClrName/*!*/ self, [NotNull]RubyRegex/*!*/ regex) {
     return MutableStringOps.Match(storage, scope, GetRubyName(scope.RubyContext, self), regex);
 }
コード例 #13
0
ファイル: ClrNameOps.cs プロジェクト: ExpertsInside/IronSP
 public static object Match(BinaryOpStorageWithScope/*!*/ storage, RubyScope/*!*/ scope, ClrName/*!*/ self, object obj) {
     return MutableStringOps.Match(storage, scope, GetRubyName(scope.RubyContext, self), obj);
 }
コード例 #14
0
ファイル: ClrNameOps.cs プロジェクト: Catweazle/ironruby
 public static MutableString/*!*/ GetClrName(ClrName/*!*/ self) {
     return MutableString.Create(self.ActualName);
 }
コード例 #15
0
ファイル: ClrNameOps.cs プロジェクト: ExpertsInside/IronSP
 public static MutableString/*!*/ GetRubyName(RubyContext/*!*/ context, ClrName/*!*/ self) {
     return MutableString.Create(self.MangledName, context.GetIdentifierEncoding());
 }
コード例 #16
0
ファイル: ClrNameOps.cs プロジェクト: Catweazle/ironruby
 public static MutableString/*!*/ GetRubyName(ClrName/*!*/ self) {
     return MutableString.Create(self.MangledName);
 }
コード例 #17
0
ファイル: ClrNameOps.cs プロジェクト: ExpertsInside/IronSP
 public static RubySymbol/*!*/ ToSymbol(RubyContext/*!*/ context, ClrName/*!*/ self) {
     return context.EncodeIdentifier(self.MangledName);
 }
コード例 #18
0
ファイル: ClrNameOps.cs プロジェクト: Catweazle/ironruby
 public static bool IsEqual(ClrName/*!*/ self, [DefaultProtocol, NotNull]string/*!*/ other) {
     return self.MangledName == other;
 }
コード例 #19
0
ファイル: ClrNameOps.cs プロジェクト: ExpertsInside/IronSP
 public static int Compare(ClrName/*!*/ self, [NotNull]ClrName/*!*/ other) {
     return String.CompareOrdinal(self.MangledName, other.MangledName);
 }
コード例 #20
0
ファイル: ClrNameOps.cs プロジェクト: Catweazle/ironruby
 public static bool IsEqual(ClrName/*!*/ self, [NotNull]ClrName/*!*/ other) {
     return self.Equals(other);
 }
コード例 #21
0
ファイル: ClrNameOps.cs プロジェクト: ExpertsInside/IronSP
 public static int Compare(RubyContext/*!*/ context, ClrName/*!*/ self, [NotNull]MutableString/*!*/ other) {
     // TODO: do not create MS
     return -Math.Sign(other.CompareTo(GetRubyName(context, self)));
 }
コード例 #22
0
ファイル: ClrNameOps.cs プロジェクト: Catweazle/ironruby
 public static int Compare(ClrName/*!*/ self, [NotNull]ClrName/*!*/ other) {
     return self.MangledName.CompareTo(other.MangledName);
 }
コード例 #23
0
ファイル: SymbolOps.cs プロジェクト: nieve/ironruby
 public static object Match(ClrName/*!*/ self, [NotNull]RubySymbol/*!*/ str) {
     throw RubyExceptions.CreateTypeError("type mismatch: Symbol given");
 }
コード例 #24
0
ファイル: ClrNameOps.cs プロジェクト: Catweazle/ironruby
 public static object Compare(BinaryOpStorage/*!*/ comparisonStorage, RespondToStorage/*!*/ respondToStorage, ClrName/*!*/ self, object other) {
     return MutableStringOps.Compare(comparisonStorage, respondToStorage, self.MangledName, other);
 }
コード例 #25
0
ファイル: ClrNameOps.cs プロジェクト: TerabyteX/main
 public static bool IsEqual(RubyContext/*!*/ context, ClrName/*!*/ self, [NotNull]RubySymbol/*!*/ other)
 {
     return other.Equals(GetRubyName(context, self));
 }