Exemplo n.º 1
0
		public override void ProcessType (TypeDefinition type)
		{
			if (!type.IsNSObject () || !type.IsNativeObject ())
				return;

			base.ProcessType (type);
		}
Exemplo n.º 2
0
        public override void ProcessType(TypeDefinition type)
        {
            if (ProductAssembly == null)
                ProductAssembly = (Profile.Current as BaseProfile).ProductAssembly;

            bool nsobject = type.IsNSObject ();
            if (!nsobject && !type.IsNativeObject ())
                return;

            if (!IsProductType (type)) {
                // we need to annotate the parent type(s) of a nested type
                // otherwise the sweeper will not keep the parents (nor the childs)
                if (type.IsNested) {
                    var parent = type.DeclaringType;
                    while (parent != null) {
                        Annotations.Mark (parent);
                        parent = parent.DeclaringType;
                    }
                }
                Annotations.Mark (type);
                Annotations.SetPreserve (type, TypePreserve.All);
            } else {
                PreserveIntPtrConstructor (type);
                if (nsobject)
                    PreserveExportedMethods (type);
            }
        }