Beispiel #1
0
        static void Main(string[] args)
        {
            var SearchParamTool    = new SearchParameterTools();
            var CompartemntDefTool = new CompartmentDefiinitionTools();


            List <CompartmentDefinition> CompartmentDefList = CompartemntDefTool.GetDefinitionList();

            foreach (var Compartment in CompartmentDefList)
            {
                ResourceType           ResType             = GetResourceTypeForCompartmentCode(Compartment.Code.Value);
                List <SearchParameter> SearchParameterList = SearchParamTool.GetSearchParameterDefinitionListForResource(ResType);
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var SearchParamTool    = new SearchParameterTools();
            var CompartemntDefTool = new CompartmentDefiinitionTools();


            List <CompartmentDefinition> CompartmentDefList = CompartemntDefTool.GetDefinitionList();

            foreach (var Compartment in CompartmentDefList)
            {
                ResourceType ResType = GetResourceTypeForCompartmentCode(Compartment.Code.Value);
                Console.WriteLine($"Compartment: {ResType.GetLiteral()}");
                Console.WriteLine($"===========================================================");
                if (ResType == ResourceType.AuditEvent)
                {
                }
                //List<SearchParameter> CompartmentSearchParameterList = SearchParamTool.GetSearchParameterDefinitionListForResource(ResType);
                foreach (var ResComponent in Compartment.Resource)
                {
                    Console.WriteLine($"Resource: {ResComponent.Code.GetLiteral()}");
                    List <SearchParameter> SearchParameterForResourceList = SearchParamTool.GetSearchParameterDefinitionListForResource(ResComponent.Code.Value);
                    foreach (string Param in ResComponent.Param)
                    {
                        var SearchParameter = SearchParameterForResourceList.SingleOrDefault(x => x.Name == Param);
                        if (SearchParameter != null)
                        {
                            Console.WriteLine($"Search Param: {SearchParameter.Name}");
                            if (SearchParameter.Type == SearchParamType.Reference)
                            {
                                if (SearchParameter.Target != null)
                                {
                                    if (SearchParameter.Target.Count() > 1)
                                    {
                                        if (SearchParameter.Target.Contains(ResType))
                                        {
                                        }
                                    }
                                    else
                                    {
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }