public LockedDownRegion(ObjectRegion region, string functionName) : base(region.Object) { foreach (var item in region.AllVariables()) { variables[item.Key] = item.Value; } this.functionName = functionName; }
public LockedDownRegion(ObjectRegion region, string functionName) : base(region.Object) { foreach (var(key, value) in region.AllVariables()) { variables[key] = value; } this.functionName = functionName; }
public ObjectRegion NewRegion(Object obj, bool purgeTempVariables) { lockVariables(); var region = new ObjectRegion(obj, invariants); foreach (var item in variables) { region.SetLocal(item.Key, item.Value, visibilityTypes[item.Key]); } foreach (var item in ReadOnlys.Where(item => item.Value == ReadOnlyType.ReadOnly)) { region.SetReadOnly(item.Key); } if (purgeTempVariables) { purgeTemporaryVariables(region); } region.SetInitializers(Initializers); return(region); }