Пример #1
0
		public DTDChoiceAutomata Choice (DTDAutomata left, DTDAutomata right)
		{
			Hashtable rightPool = choiceTable [left] as Hashtable;
			if (rightPool == null) {
				rightPool = new Hashtable ();
				choiceTable [left] = rightPool;
			}
			DTDChoiceAutomata result = rightPool [right] as DTDChoiceAutomata;
			if (result == null) {
				result = new DTDChoiceAutomata (root, left, right);
				rightPool [right] = result;
			}
			return result;
		}
Пример #2
0
        public DTDChoiceAutomata Choice(DTDAutomata left, DTDAutomata right)
        {
            Hashtable rightPool = choiceTable [left] as Hashtable;

            if (rightPool == null)
            {
                rightPool          = new Hashtable();
                choiceTable [left] = rightPool;
            }
            DTDChoiceAutomata result = rightPool [right] as DTDChoiceAutomata;

            if (result == null)
            {
                result            = new DTDChoiceAutomata(root, left, right);
                rightPool [right] = result;
            }
            return(result);
        }
        public DTDChoiceAutomata Choice(DTDAutomata left, DTDAutomata right)
        {
            Hashtable hashtable = this.choiceTable[left] as Hashtable;

            if (hashtable == null)
            {
                hashtable = new Hashtable();
                this.choiceTable[left] = hashtable;
            }
            DTDChoiceAutomata dtdchoiceAutomata = hashtable[right] as DTDChoiceAutomata;

            if (dtdchoiceAutomata == null)
            {
                dtdchoiceAutomata = new DTDChoiceAutomata(this.root, left, right);
                hashtable[right]  = dtdchoiceAutomata;
            }
            return(dtdchoiceAutomata);
        }