コード例 #1
0
ファイル: Validity.cs プロジェクト: tralivali1234/IL2JS
        // NOTE: May be called on invalid definitions
        public override bool PropertyAlwaysUsed(CST.AssemblyDef assemblyDef, CST.TypeDef typeDef, CST.PropertyDef propDef)
        {
#if false
            if (env.AttributeHelper.PropertyHasAttribute
                    (assemblyDef, typeDef, propDef, env.Global.CompilerGeneratedAttributeRef, false))
            {
                return(false);
            }
#endif

            if (env.AttributeHelper.PropertyHasAttribute
                    (assemblyDef, typeDef, propDef, env.AttributeHelper.IgnoreAttributeRef, true, true))
            {
                return(false);
            }

            if (HasFullReflection(assemblyDef, typeDef))
            {
                return(true);
            }

            var isUsed = default(bool);
            env.AttributeHelper.GetValueFromProperty
                (assemblyDef,
                typeDef,
                propDef,
                env.AttributeHelper.UsedAttributeRef,
                env.AttributeHelper.TheIsUsedProperty,
                true,
                false,
                ref isUsed);
            if (isUsed)
            {
                return(true);
            }

            return(false);
        }
コード例 #2
0
ファイル: Validity.cs プロジェクト: modulexcite/IL2JS
 public abstract bool PropertyAlwaysUsed(AssemblyDef assemblyDef, TypeDef typeDef, PropertyDef propDef);
コード例 #3
0
 public string ResolvePropertyDefToSlot(CST.AssemblyDef assemblyDef, CST.TypeDef typeDef, CST.PropertyDef propDef)
 {
     return(TypeMappingFor(assemblyDef, typeDef).ResolvePropertyToSlot
                (propDef.QualifiedMemberName(env.Global, assemblyDef, typeDef)));
 }