예제 #1
0
 public ConstantInfo(IPythonConstant value, PythonAnalyzer projectState)
     : base((BuiltinClassInfo)projectState.GetAnalysisValueFromObjects(value.Type))
 {
     _value       = value;
     _memberType  = value.MemberType;
     _builtinInfo = ((BuiltinClassInfo)projectState.GetAnalysisValueFromObjects(value.Type)).Instance;
 }
예제 #2
0
        public static string GetString(this IPythonConstant c)
        {
            switch (c.Value)
            {
            case string s:
                return(s);

            case AsciiString ascii:
                return(ascii.String);

            default:
                return(null);
            }
        }
예제 #3
0
        internal ISet <Namespace> GetConstant(IPythonConstant value)
        {
            object key = value ?? _nullKey;

            return(GetCached <ISet <Namespace> >(key, () => new ConstantInfo(value, this).SelfSet));
        }
예제 #4
0
        internal IAnalysisSet GetConstant(IPythonConstant value)
        {
            object key = value ?? _nullKey;

            return(GetCached(key, () => new ConstantInfo(value, this)) ?? _noneInst);
        }
예제 #5
0
        internal IAnalysisSet GetConstant(IPythonConstant value)
        {
            object key = value ?? _nullKey;

            return(GetCached(key, () => ConstantInfo.Create(this, value) ?? _noneInst) ?? _noneInst);
        }
예제 #6
0
 public ConstantInfo(IPythonConstant value, PythonAnalyzer projectState)
     : base((BuiltinClassInfo)projectState.GetAnalysisValueFromObjects(value.Type)) {
     _value = value;
     _memberType = value.MemberType;
     _builtinInfo = ((BuiltinClassInfo)projectState.GetAnalysisValueFromObjects(value.Type)).Instance;
 }
예제 #7
0
 public ValueView(IModuleContext context, string name, IPythonConstant member)
     : base(context, name, member)
 {
     _value = member;
 }
예제 #8
0
파일: ValueView.cs 프로젝트: omnimark/PTVS
 public ValueView(IModuleContext context, string name, IPythonConstant member)
     : base(context, name, member) {
     _value = member;
 }