IronRuby.Runtime.RubyMethodDebugInfo.GetOrCreate C# (CSharp) Method

GetOrCreate() public static method

public static GetOrCreate ( string methodName ) : RubyMethodDebugInfo
methodName string
return RubyMethodDebugInfo
        public static RubyMethodDebugInfo GetOrCreate(string/*!*/ methodName) {
            lock (_Infos) {
                RubyMethodDebugInfo info;
                if (!_Infos.TryGetValue(methodName, out info)) {
                    info = new RubyMethodDebugInfo();
                    _Infos.Add(methodName, info);
                }
                return info;
            }
        }

Usage Example

コード例 #1
0
 public override void MarkSequencePoint(LambdaExpression method, int ilOffset, DebugInfoExpression node)
 {
     RubyMethodDebugInfo.GetOrCreate(method.Name).AddMapping(ilOffset, node.StartLine);
 }