private registry_item GetFakeRegistryItem(string key, string name, eValueTypes dataType, string dataValue) { string hive = Enum.GetName(typeof(eHiveNames), eHiveNames.HKEY_LOCAL_MACHINE); string keyCollectedSuccessfully = "The Key, which fullPath is '{0}\\{1}\\{2}', was collected sucessfully."; registry_item registryItem = new registry_item(); registryItem.hive = new EntityItemRegistryHiveType() { Value = hive }; registryItem.key = new EntityItemStringType() { Value = key }; registryItem.name = new EntityItemStringType() { Value = name }; registryItem.type = new EntityItemRegistryTypeType() { Value = RegistryHelper.GetValueTypeAsString(dataType) }; registryItem.value = new EntityItemAnySimpleType[] { new EntityItemAnySimpleType() { Value = dataValue } }; registryItem.status = StatusEnumeration.exists; registryItem.message = MessageType.FromString(string.Format(keyCollectedSuccessfully, hive, key, name)); return(registryItem); }
public int getStat(eValueTypes vt) { switch (vt) { case eValueTypes.ENERGY: return(energy); case eValueTypes.COST: return(cost); case eValueTypes.ATTACK: return(attack); case eValueTypes.DEFENSE: return(defense); case eValueTypes.LEVEL: return(level); case eValueTypes.STAR: return((int)star); default: return(0); } }
public static String ConvertToGetValueMethodNameFromValueType(eValueTypes valueType) { switch (valueType) { case eValueTypes.BINARY: return "GetBinaryValue"; case eValueTypes.DWORD: case eValueTypes.DWORD_LITTLE_ENDIAN: return "GetDWORDValue"; case eValueTypes.EXPANDED_STRING: return "GetExpandedStringValue"; case eValueTypes.MULTI_STRING: return "GetMultiStringValue"; case eValueTypes.STRING: return "GetStringValue"; default: throw new Exception("Invalid type while trying to convert valueToMatch type into get valueToMatch method name."); } }
public static String ConvertToGetValueMethodNameFromValueType(eValueTypes valueType) { switch (valueType) { case eValueTypes.BINARY: return("GetBinaryValue"); case eValueTypes.DWORD: case eValueTypes.DWORD_LITTLE_ENDIAN: return("GetDWORDValue"); case eValueTypes.EXPANDED_STRING: return("GetExpandedStringValue"); case eValueTypes.MULTI_STRING: return("GetMultiStringValue"); case eValueTypes.STRING: return("GetStringValue"); default: throw new Exception("Invalid type while trying to convert valueToMatch type into get valueToMatch method name."); } }
public int getStat(eValueTypes vt) { switch (vt) { case eValueTypes.ENERGY: return energy; case eValueTypes.COST: return cost; case eValueTypes.ATTACK: return attack; case eValueTypes.DEFENSE: return defense; case eValueTypes.LEVEL: return level; case eValueTypes.STAR: return (int)star; default: return 0; } }
public static String GetValueTypeAsString(eValueTypes valueTypeID) { return(Enum.GetName(typeof(RegistryItemTypeType), valueTypeID)); }
public RegistryItemSystemData(eValueTypes dataTypeID, Object dataValue) { this._valueTypeID = dataTypeID; this._dataValue = dataValue; }
private registry_item GetFakeRegistryItem(string key, string name, eValueTypes dataType, string dataValue) { string hive = Enum.GetName(typeof(eHiveNames), eHiveNames.HKEY_LOCAL_MACHINE); string keyCollectedSuccessfully = "The Key, which fullPath is '{0}\\{1}\\{2}', was collected sucessfully."; registry_item registryItem = new registry_item(); registryItem.hive = new EntityItemRegistryHiveType() { Value = hive }; registryItem.key = new EntityItemStringType() { Value = key }; registryItem.name = new EntityItemStringType() { Value = name }; registryItem.type = new EntityItemRegistryTypeType() { Value = RegistryHelper.GetValueTypeAsString(dataType) }; registryItem.value = new EntityItemAnySimpleType[] { new EntityItemAnySimpleType() { Value = dataValue } }; registryItem.status = StatusEnumeration.exists; registryItem.message = MessageType.FromString(string.Format(keyCollectedSuccessfully, hive, key, name)); return registryItem; }
public static String GetValueTypeAsString(eValueTypes valueTypeID) { return Enum.GetName(typeof(RegistryItemTypeType), valueTypeID); }