Example #1
0
        internal EHClausesArray(EHDecoder ehDecoder, int[] offsetsMap)
        {
            clauses = new EHClause [ehDecoder.GetCount()];

            for (int i = 0; i < ehDecoder.GetCount(); i++)
            {
                clauses[i] = new EHClause(ehDecoder, i, offsetsMap);
            }
        }
Example #2
0
        internal EHClausesArray(EHDecoder ehDecoder, int[] offsetsMap)
        {
            clauses = new EHClause [ehDecoder.GetCount()];

            for (int i = 0; i < ehDecoder.GetCount(); i++)
                clauses[i] = new EHClause(ehDecoder,i,offsetsMap);
        }
Example #3
0
			public EHClausesArrayWithOneClauseRemoved(IEnumerable clauses, EHClause removed)
			{
				this.clauses = clauses; this.removed = removed;
			}
Example #4
0
				public Enumerator(IEnumerable clauses, EHClause removed)
				{
					this.clauses = clauses; this.removed = removed;
					enumerator = clauses.GetEnumerator();
				}
Example #5
0
		private static BlockStruct GetNearestBlock(IEnumerable clauses, int iNum, out EHClause clause)
		{
			int start = -1;
			int end = 1<<30;
			BlockType type = BlockType.Global;

			clause = null;
			foreach(EHClause c in clauses)
			{
				if(DecreaseBlock(ref start,ref end,iNum,c.TryStart,c.TryLength))
				{
					clause = c;
					type = BlockType.Try;
				}
				if(DecreaseBlock(ref start,ref end,iNum,c.HandlerStart,c.HandlerLength))
				{
					clause = c;
					if(c.Kind == EHClauseKind.FinallyHandler)
						type = BlockType.Finally;
					else
						type = BlockType.Catch;
				}
				if(c.Kind == EHClauseKind.UserFilteredHandler)
					if(DecreaseBlock(ref start,ref end,iNum,c.FilterStart,c.HandlerStart - c.FilterStart))
					{
						clause = c;
						type = BlockType.Filter;
					}
			}
			return(new BlockStruct(type,start,end));
		}