/*package*/ internal bool AddServerSideDynamicProperty( IDynamicProperty prop) { if (_dphSrv == null) { DynamicPropertyHolder dphSrv = new DynamicPropertyHolder(); bool fLocked = false; RuntimeHelpers.PrepareConstrainedRegions(); try { Monitor.ReliableEnter(this, ref fLocked); if (_dphSrv == null) { _dphSrv = dphSrv; } } finally { if (fLocked) { Monitor.Exit(this); } } } return(_dphSrv.AddDynamicProperty(prop)); }
/*package*/ internal bool AddServerSideDynamicProperty( IDynamicProperty prop) { if (_dphSrv == null) { DynamicPropertyHolder dphSrv = new DynamicPropertyHolder(); lock (this) { if (_dphSrv == null) { _dphSrv = dphSrv; } } } return(_dphSrv.AddDynamicProperty(prop)); }
internal bool AddProxySideDynamicProperty(IDynamicProperty prop) { lock (this) { if (_dph == null) { DynamicPropertyHolder dph = new DynamicPropertyHolder(); lock (this) { if (_dph == null) { _dph = dph; } } } return(_dph.AddDynamicProperty(prop)); } }