예제 #1
0
        private EntityItemAnySimpleType[] getRegistryItemTypeDataValues(RegistryItemSystemData registryCollectedData)
        {
            var systemData = registryCollectedData.DataValue;
            var valueType  = registryCollectedData.ValueType;

            if (valueType == eValueTypes.MULTI_STRING)
            {
                return(((string[])systemData).Select(value => NewEntityItem(value)).ToArray());
            }

            if (valueType == eValueTypes.BINARY || valueType == eValueTypes.DWORD_LITTLE_ENDIAN)
            {
                return new[] { NewEntityItem(GetRegBinaryAsString((byte[])systemData), SimpleDatatypeEnumeration.binary) }
            }
            ;

            if (valueType == eValueTypes.DWORD)
            {
                return new[] { NewEntityItem(systemData.ToString(), SimpleDatatypeEnumeration.@int) }
            }
            ;

            return(new[] { NewEntityItem(systemData.ToString()) });
        }
예제 #2
0
        private EntityItemAnySimpleType[] getRegistryItemTypeDataValues(RegistryItemSystemData registryCollectedData)
        {
            var systemData = registryCollectedData.DataValue;
            var valueType = registryCollectedData.ValueType;

            if (valueType == eValueTypes.MULTI_STRING)
                return ((string[])systemData).Select(value => NewEntityItem(value)).ToArray();

            if (valueType == eValueTypes.BINARY || valueType == eValueTypes.DWORD_LITTLE_ENDIAN)
                return new[] { NewEntityItem(GetRegBinaryAsString((byte[])systemData), SimpleDatatypeEnumeration.binary) };

            if (valueType == eValueTypes.DWORD)
                return new[] { NewEntityItem(systemData.ToString(), SimpleDatatypeEnumeration.@int) };

            return new[] { NewEntityItem(systemData.ToString()) };
        }