コード例 #1
0
        public static T CreateObject <T>(WmiContext context, ManagementObject wmiObject)
            where T : WmiObject, new()
        {
            var r = new T();

            r.m_Context   = context;
            r.m_wmiObject = wmiObject;
            r.OnLoadProperties();
            r.OnCreated();
            return(r);
        }
コード例 #2
0
        public WmiQuery(WmiContext context, Expression expression)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }

            m_Context    = context;
            m_Expression = expression;
        }
コード例 #3
0
 public WmiQueryBuilder(WmiContext context)
 {
     m_Context = context;
 }
コード例 #4
0
 public WmiQuery(WmiContext context)
 {
     m_Context    = context;
     m_Expression = Expression.Constant(this);
 }