Пример #1
0
        // Token: 0x0600022F RID: 559 RVA: 0x0000A210 File Offset: 0x00008410
        public MyType GetCommonROProperty <MyType>(string key)
        {
            MyType result = default(MyType);

            try
            {
                using (AmClusterRawData resourceControlData = this.GetResourceControlData(AmClusterResourceControlCode.CLUSCTL_RESOURCE_GET_RO_COMMON_PROPERTIES))
                {
                    AmClusterPropList amClusterPropList = new AmClusterPropList(resourceControlData.Buffer, resourceControlData.Size);
                    result = amClusterPropList.Read <MyType>(key);
                }
            }
            catch (ClusterApiException arg)
            {
                AmClusterResource.Tracer.TraceDebug <string, string, ClusterApiException>((long)this.GetHashCode(), "GetCommonROProperty( {0} ) on '{1}' encountered an exception: {2}", key, this.Name, arg);
            }
            return(result);
        }
Пример #2
0
        // Token: 0x060001AE RID: 430 RVA: 0x00007A98 File Offset: 0x00005C98
        public MyType GetPrivateProperty <MyType>(string key)
        {
            MyType result = default(MyType);

            try
            {
                using (AmClusterRawData networkControlData = this.GetNetworkControlData(AmClusterNetworkControlCode.CLUSCTL_NETWORK_GET_PRIVATE_PROPERTIES))
                {
                    AmClusterPropList amClusterPropList = new AmClusterPropList(networkControlData.Buffer, networkControlData.Size);
                    result = amClusterPropList.Read <MyType>(key);
                }
            }
            catch (ClusterApiException arg)
            {
                AmClusterNetwork.Tracer.TraceDebug <string, string, ClusterApiException>((long)this.GetHashCode(), "GetPrivateProperty( {0} ) on '{1}' encountered an exception: {2}", key, this.Name, arg);
            }
            return(result);
        }
Пример #3
0
        // Token: 0x06000216 RID: 534 RVA: 0x00009964 File Offset: 0x00007B64
        public string[] ParseMultipleStringsFromPropList(string propName)
        {
            List <string>     list = new List <string>(10);
            SafeHGlobalHandle safeHGlobalHandle;
            uint num2;
            uint num = ClusapiMethods.ResUtilFindMultiSzProperty(this.RawBuffer, this.BufferSize, propName, out safeHGlobalHandle, out num2);

            if (num != 2U)
            {
                if (num != 0U)
                {
                    throw AmExceptionHelper.ConstructClusterApiException((int)num, "ResUtilFindMultiSzProperty()", new object[0]);
                }
                IntPtr left = safeHGlobalHandle.DangerousGetHandle();
                int    num3 = 0;
                while ((long)num3 < (long)((ulong)num2))
                {
                    string text = Marshal.PtrToStringUni(AmClusterPropList.IntPtrAdd(left, num3));
                    list.Add(text);
                    num3 += (text.Length + 1) * 2;
                }
            }
            return(list.ToArray());
        }
Пример #4
0
 // Token: 0x06000232 RID: 562 RVA: 0x0000A464 File Offset: 0x00008664
 public void SetPrivatePropertyList(AmClusterPropList propList)
 {
     this.SetResourceControlData(AmClusterResourceControlCode.CLUSCTL_RESOURCE_SET_PRIVATE_PROPERTIES, propList.RawBuffer, propList.BufferSize);
 }