Esempio n. 1
0
        /// <summary>
        /// <para>Makes an instance that was previously published through the <see cref='System.Management.Instrumentation.Instrumentation.Publish'/>
        /// method no longer visible through management instrumentation.</para>
        /// </summary>
        /// <param name='instanceData'>The object to remove from visibility for management instrumentation.</param>
        public static void Revoke(Object instanceData)
        {
            IInstance instance = instanceData as IInstance;

            if (instance != null)
            {
                instance.Published = false;
            }
            else
            {
                GetRevokeFunction(instanceData.GetType())(instanceData);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// This method makes an instance that was previously published through the Instrumentation.Publish
 /// method no longer visible through management instrumenation
 /// </summary>
 /// <param name="o">Object to remove from visibility for management instrumentation.</param>
 public static void Revoke(Object o)
 {
     GetRevokeFunction(o.GetType())(o);
 }