Ejemplo n.º 1
0
        private static bool VerifyParametersAndCheckReverse(Args args, params string[] parameters)
        {
            ISet <string> kwArgs = args.AsMap().Keys;

            if (kwArgs.Contains(REVERSE))
            {
                parameters = Arrays.copyOf(parameters, parameters.Length + 1);
                parameters[parameters.Length - 1] = REVERSE;
            }
            VerifyParameters(kwArgs, parameters);
            return(args.GetBoolean(REVERSE, false, true).Value);
        }
Ejemplo n.º 2
0
        private static DumpStoreChain ChainForNode(Args args)
        {
            ISet <string> kwArgs = args.AsMap().Keys;

            VerifyParameters(kwArgs, kwArgs.Contains(RELS) ? RELS : PROPS, NODE);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final long node = long.Parse(args.get(NODE, null));
            long node = long.Parse(args.Get(NODE, null));

            if (args.GetBoolean(RELS, false, true).Value)
            {
                return(new DumpRelationshipChainAnonymousInnerClass(node));
            }
            else if (args.GetBoolean(PROPS, false, true).Value)
            {
                return(new DumpPropertyChainAnonymousInnerClass(node));
            }
            else
            {
                throw InvalidUsage(string.Format("Must be either -{0} or -{1}", RELS, PROPS));
            }
        }