Esempio n. 1
0
        protected virtual void Process(ApiNameSpace apiNameSpace)
        {
            var ns = CreateHierarchyElementInternal <HierarchyNamespace> (this);

            ns.Init(apiNameSpace);
            Helpers.ForEachNotNull(apiNameSpace.ChildElements, (ApiElement e) => {
                switch (e)
                {
                case ApiClass klass:
                    Process(ns, klass);
                    break;

                case ApiInterface iface:
                    Process(ns, iface);
                    break;

                default:
                    Logger.Warning($"Unsupported element type in namespace {apiNameSpace.Name}: {e.GetType ().FullName}");
                    break;
                }
            });

            Helpers.AddToList(ns, ref namespaces);
            TypeIndex.Add(ns);
        }
Esempio n. 2
0
 public override void Init(ApiElement apiElement)
 {
     base.Init(apiElement);
     apiNameSpace = EnsureApiElementType <ApiNameSpace> (apiElement);
     JniName      = apiNameSpace.JniName;
 }