Mono.CSharp.CloneContext.LookupBlock C# (CSharp) Method

LookupBlock() public method

public LookupBlock ( Block from ) : Block
from Block
return Block
		public Block LookupBlock (Block from)
		{
			Block result;
			if (!block_map.TryGetValue (from, out result)) {
				result = (Block) from.Clone (this);
			}

			return result;
		}

Usage Example

Example #1
0
		protected override void CloneTo (CloneContext clonectx, Statement t)
		{
			TryCatch target = (TryCatch) t;

			target.Block = clonectx.LookupBlock (Block);
			if (General != null)
				target.General = (Catch) General.Clone (clonectx);
			if (Specific != null){
				target.Specific = new List<Catch> ();
				foreach (Catch c in Specific)
					target.Specific.Add ((Catch) c.Clone (clonectx));
			}
		}
All Usage Examples Of Mono.CSharp.CloneContext::LookupBlock