Beispiel #1
0
        // Token: 0x06000231 RID: 561 RVA: 0x0000A320 File Offset: 0x00008520
        public void SetPrivateProperty <MyType>(string key, MyType value)
        {
            int num = 0;

            if (typeof(string) == typeof(MyType))
            {
                string value2 = (string)((object)value);
                using (AmClusterPropListDisposable amClusterPropListDisposable = AmClusPropListMaker.CreatePropListString(key, value2, out num))
                {
                    this.SetResourceControlData(AmClusterResourceControlCode.CLUSCTL_RESOURCE_SET_PRIVATE_PROPERTIES, amClusterPropListDisposable.RawBuffer, amClusterPropListDisposable.BufferSize);
                    return;
                }
            }
            if (typeof(int) == typeof(MyType))
            {
                int value3 = (int)((object)value);
                using (AmClusterPropListDisposable amClusterPropListDisposable2 = AmClusPropListMaker.CreatePropListInt(key, value3, out num))
                {
                    this.SetResourceControlData(AmClusterResourceControlCode.CLUSCTL_RESOURCE_SET_PRIVATE_PROPERTIES, amClusterPropListDisposable2.RawBuffer, amClusterPropListDisposable2.BufferSize);
                    return;
                }
            }
            if (typeof(string[]) == typeof(MyType))
            {
                string[] value4 = (string[])((object)value);
                using (AmClusterPropListDisposable amClusterPropListDisposable3 = AmClusPropListMaker.CreatePropListMultiString(key, value4, out num))
                {
                    this.SetResourceControlData(AmClusterResourceControlCode.CLUSCTL_RESOURCE_SET_PRIVATE_PROPERTIES, amClusterPropListDisposable3.RawBuffer, amClusterPropListDisposable3.BufferSize);
                }
            }
        }
Beispiel #2
0
        // Token: 0x060001AF RID: 431 RVA: 0x00007B20 File Offset: 0x00005D20
        public void SetCommonProperty <MyType>(string key, MyType value)
        {
            int num = 0;

            if (typeof(string) == typeof(MyType))
            {
                string value2 = (string)((object)value);
                using (AmClusterPropListDisposable amClusterPropListDisposable = AmClusPropListMaker.CreatePropListString(key, value2, out num))
                {
                    this.SetNetworkControlData(AmClusterNetworkControlCode.CLUSCTL_NETWORK_SET_COMMON_PROPERTIES, amClusterPropListDisposable.RawBuffer, amClusterPropListDisposable.BufferSize);
                    return;
                }
            }
            if (typeof(int) == typeof(MyType))
            {
                int value3 = (int)((object)value);
                using (AmClusterPropListDisposable amClusterPropListDisposable2 = AmClusPropListMaker.CreatePropListInt(key, value3, out num))
                {
                    this.SetNetworkControlData(AmClusterNetworkControlCode.CLUSCTL_NETWORK_SET_COMMON_PROPERTIES, amClusterPropListDisposable2.RawBuffer, amClusterPropListDisposable2.BufferSize);
                    return;
                }
            }
            if (typeof(string[]) == typeof(MyType))
            {
                string[] value4 = (string[])((object)value);
                using (AmClusterPropListDisposable amClusterPropListDisposable3 = AmClusPropListMaker.CreatePropListMultiString(key, value4, out num))
                {
                    this.SetNetworkControlData(AmClusterNetworkControlCode.CLUSCTL_NETWORK_SET_COMMON_PROPERTIES, amClusterPropListDisposable3.RawBuffer, amClusterPropListDisposable3.BufferSize);
                }
            }
        }