Mono.CSharp.Property.Define C# (CSharp) Method

Define() public method

public Define ( ) : bool
return bool
        public override bool Define()
        {
            if (!base.Define ())
                return false;

            flags |= MethodAttributes.HideBySig | MethodAttributes.SpecialName;

            if (!IsInterface && (ModFlags & (Modifiers.ABSTRACT | Modifiers.EXTERN)) == 0 &&
                AccessorSecond != null && Get.Block == null && Set.Block == null) {
                if (Compiler.Settings.Version <= LanguageVersion.ISO_2)
                    Report.FeatureIsNotAvailable (Compiler, Location, "automatically implemented properties");

                Get.ModFlags |= Modifiers.COMPILER_GENERATED;
                Set.ModFlags |= Modifiers.COMPILER_GENERATED;
                CreateAutomaticProperty ();
            }

            if (!DefineAccessors ())
                return false;

            if (!CheckBase ())
                return false;

            DefineBuilders (MemberKind.Property, ParametersCompiled.EmptyReadOnlyParameters);
            return true;
        }