internal IEnumerable <NSObjectTypeInfo> GetRegisteredObjects(TypeSystemService.ProjectContentWrapper dom, IAssembly assembly)
        {
            var nso = Resolve(dom, nsobjectType);

            if (nso == null || nso.Kind == TypeKind.Unknown)
            {
                throw new Exception("Could not get NSObject from type database");
            }

            //FIXME: only emit this for the wrapper NS
//			yield return new NSObjectTypeInfo ("NSObject", nso.GetDefinition ().FullName, null, null, false, false, false);
            int cnt = 0, infcnt = 0, models = 0;

            foreach (var contextType in assembly.GetAllTypeDefinitions())
            {
                var importedType = dom.Compilation.Import(contextType);
                if (importedType.IsDerivedFrom(nso))
                {
                    var info = ConvertType(dom, importedType);
                    if (info != null)
                    {
                        yield return(info);
                    }
                }
            }
        }
		public override void ApplyTo(IAssembly assembly, IAttributeStore attributeStore, IErrorReporter errorReporter) {
			foreach (var t in assembly.GetAllTypeDefinitions()) {
				if (!attributeStore.AttributesFor(t).HasAttribute<DefaultMemberReflectabilityAttribute>()) {
					ApplyTo(t, attributeStore, errorReporter);
				}
			}
		}
Exemplo n.º 3
0
 public override void ApplyTo(IAssembly assembly, IAttributeStore attributeStore, IErrorReporter errorReporter)
 {
     foreach (var t in assembly.GetAllTypeDefinitions())
     {
         if (!attributeStore.AttributesFor(t).HasAttribute <DefaultMemberReflectabilityAttribute>())
         {
             ApplyTo(t, attributeStore, errorReporter);
         }
     }
 }
Exemplo n.º 4
0
		internal IEnumerable<NSObjectTypeInfo> GetRegisteredObjects (TypeSystemService.ProjectContentWrapper dom, IAssembly assembly)
		{
			var nso = Resolve (dom, nsobjectType);
			if (nso == null || nso.Kind == TypeKind.Unknown)
				throw new Exception ("Could not get NSObject from type database");
			
			//FIXME: only emit this for the wrapper NS
//			yield return new NSObjectTypeInfo ("NSObject", nso.GetDefinition ().FullName, null, null, false, false, false);
			int cnt = 0, infcnt=0, models=0;
			
			foreach (var contextType in assembly.GetAllTypeDefinitions ()) {
				if (contextType.IsDerivedFrom (nso)) {
					var info = ConvertType (dom, contextType);
					if (info != null)
						yield return info;
				}
			}
		}