Пример #1
0
        public static HookingSettings With(string aProcessName, string aModuleName, string aFunctionName)
        {
            var hookingSettings = new HookingSettings();
            hookingSettings.Add(aProcessName, aModuleName, aFunctionName);

            return hookingSettings;
        }
Пример #2
0
        public static HookingSettings FromXml(Stream stream)
        {
            var hookingSettings = new HookingSettings();

            using (var reader = new XmlTextReader(stream))
            {
                reader.WhitespaceHandling = WhitespaceHandling.None;
                reader.ReadStartElement("HookingSettings");

                while (!reader.EOF)
                {
                    if (reader.NodeType != XmlNodeType.Element)
                    {
                        reader.Read();
                        continue;
                    }

                    var processName  = reader.GetAttribute("processName");
                    var moduleName   = reader.GetAttribute("moduleName");
                    var functionName = reader.GetAttribute("functionName");
                    hookingSettings.Add(processName, moduleName, functionName);
                    reader.ReadStartElement("HookingRule");
                }
            }

            return(hookingSettings);
        }
Пример #3
0
        public static HookingSettings With(string aProcessName, string aModuleName, string aFunctionName)
        {
            var hookingSettings = new HookingSettings();

            hookingSettings.Add(aProcessName, aModuleName, aFunctionName);

            return(hookingSettings);
        }
Пример #4
0
        public static HookingSettings FromXml(Stream stream)
        {
            var hookingSettings = new HookingSettings();

            using (var reader = new XmlTextReader(stream))
            {
                reader.WhitespaceHandling = WhitespaceHandling.None;
                reader.ReadStartElement("HookingSettings");

                while (!reader.EOF)
                {
                    if (reader.NodeType != XmlNodeType.Element)
                    {
                        reader.Read();
                        continue;
                    }

                    var processName = reader.GetAttribute("processName");
                    var moduleName = reader.GetAttribute("moduleName");
                    var functionName = reader.GetAttribute("functionName");
                    hookingSettings.Add(processName, moduleName, functionName);
                    reader.ReadStartElement("HookingRule");
                }
            }

            return hookingSettings;
        }