System.Runtime.Remoting.Contexts.DynamicPropertyHolder.RemoveDynamicProperty C# (CSharp) Method

RemoveDynamicProperty() private method

private RemoveDynamicProperty ( String name ) : bool
name String
return bool
        internal virtual bool RemoveDynamicProperty(String name)
        {
            lock(this) {
                // We have to remove a property for a specific context
                for (int i=0; i<_numProps; i++)
                {
                    if (_props[i].Name.Equals(name))
                    {
                        _props[i] = _props[_numProps-1];
                        _numProps--;
                        // throw away the dynamic sink list                    
                        _sinks = null;
                        return true;
                    }
                }
                throw new RemotingException(
                    String.Format(
                        CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_Contexts_NoProperty"),
                        name));
            }
        }
    

Usage Example

コード例 #1
0
 private bool RemovePerContextDynamicProperty(String name)
 {
     // We have to remove a property for this context
     if (_dphCtx == null)
     {
         throw new RemotingException(
                   String.Format(
                       CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_Contexts_NoProperty"),
                       name
                       ));
     }
     return(_dphCtx.RemoveDynamicProperty(name));
 }
All Usage Examples Of System.Runtime.Remoting.Contexts.DynamicPropertyHolder::RemoveDynamicProperty