System.Runtime.Remoting.Contexts.Context.GetProperty C# (CSharp) Метод

GetProperty() приватный Метод

private GetProperty ( String name ) : IContextProperty
name String
Результат IContextProperty
        public virtual IContextProperty GetProperty(String name)
        {
            if (_ctxProps == null || name == null)
            {
                return null;
            }
            IContextProperty prop = null;
            for (int i=0; i<_numCtxProps; i++)
            {
                if (_ctxProps[i].Name.Equals(name))
                {
                    prop = _ctxProps[i];
                    break;
                }
            }
            return prop;
        }
    

Usage Example

Пример #1
0
 // Determine if a context is OK with respect to this attribute.
 public override bool IsContextOK
     (Context ctx, IConstructionCallMessage msg)
 {
     if (ctx == null)
     {
         throw new ArgumentNullException("ctx");
     }
     if (msg == null)
     {
         throw new ArgumentNullException("msg");
     }
     if (flag == NOT_SUPPORTED)
     {
         if (ctx.GetProperty("Synchronization") != null)
         {
             return(false);
         }
     }
     else if (flag == REQUIRED)
     {
         Object prop = ctx.GetProperty("Synchronization");
         if (prop == null)
         {
             return(false);
         }
         savedProp = prop;
     }
     else if (flag != REQUIRES_NEW)
     {
         return(true);
     }
     return(false);
 }
All Usage Examples Of System.Runtime.Remoting.Contexts.Context::GetProperty