static private GrowPropertiesArray ( IDynamicProperty props ) : IDynamicProperty[] | ||
props | IDynamicProperty | |
return | IDynamicProperty[] |
internal virtual bool AddDynamicProperty(IDynamicProperty prop) { bool result; lock (this) { DynamicPropertyHolder.CheckPropertyNameClash(prop.Name, this._props, this._numProps); bool flag2 = false; if (this._props == null || this._numProps == this._props.Length) { this._props = DynamicPropertyHolder.GrowPropertiesArray(this._props); flag2 = true; } IDynamicProperty[] props = this._props; int numProps = this._numProps; this._numProps = numProps + 1; props[numProps] = prop; if (flag2) { this._sinks = DynamicPropertyHolder.GrowDynamicSinksArray(this._sinks); } if (this._sinks == null) { this._sinks = new IDynamicMessageSink[this._props.Length]; for (int i = 0; i < this._numProps; i++) { this._sinks[i] = ((IContributeDynamicSink)this._props[i]).GetDynamicSink(); } } else { this._sinks[this._numProps - 1] = ((IContributeDynamicSink)prop).GetDynamicSink(); } result = true; } return(result); }
internal virtual bool AddDynamicProperty(IDynamicProperty prop) { lock (this) { DynamicPropertyHolder.CheckPropertyNameClash(prop.Name, this._props, this._numProps); bool local_2 = false; if (this._props == null || this._numProps == this._props.Length) { this._props = DynamicPropertyHolder.GrowPropertiesArray(this._props); local_2 = true; } IDynamicProperty[] temp_19 = this._props; int local_3 = this._numProps; this._numProps = local_3 + 1; int temp_26 = local_3; IDynamicProperty temp_27 = prop; temp_19[temp_26] = temp_27; if (local_2) { this._sinks = DynamicPropertyHolder.GrowDynamicSinksArray(this._sinks); } if (this._sinks == null) { this._sinks = new IDynamicMessageSink[this._props.Length]; for (int local_4 = 0; local_4 < this._numProps; ++local_4) { this._sinks[local_4] = ((IContributeDynamicSink)this._props[local_4]).GetDynamicSink(); } } else { this._sinks[this._numProps - 1] = ((IContributeDynamicSink)prop).GetDynamicSink(); } return(true); } }