Exemple #1
0
        protected virtual void Process(HierarchyMethod parent, ApiException exception)
        {
            var hierarchyException = CreateHierarchyElementInternal <HierarchyException> (parent);

            hierarchyException.Init(exception);
            parent.AddMember(hierarchyException);
        }
Exemple #2
0
        protected virtual void Process(HierarchyMethod parent, ApiTypeParameter typeParameter)
        {
            var hierarchyTypeParameter = CreateHierarchyElementInternal <HierarchyTypeParameter> (parent);

            hierarchyTypeParameter.Init(typeParameter);
            AddTypeParameterGenericConstraints(hierarchyTypeParameter, typeParameter);
            parent.AddMember(hierarchyTypeParameter);
        }
Exemple #3
0
        protected virtual void AddMethodMembers(HierarchyMethod method, ApiMethod apiMethod)
        {
            Helpers.ForEachNotNull(apiMethod.ChildElements, (ApiElement e) => {
                switch (e)
                {
                case ApiMethodParameter parameter:
                    Process(method, parameter);
                    break;

                case ApiTypeParameter typeParameter:
                    Process(method, typeParameter);
                    break;

                case ApiException exception:
                    Process(method, exception);
                    break;

                default:
                    Logger.Warning($"Unexpected member type for {apiMethod.GetType ()}: '{e.GetType ().FullName}'");
                    break;
                }
            });
        }
Exemple #4
0
 public abstract void AddMember(HierarchyMethod method);