Ejemplo n.º 1
0
        public static HookingSettings With(string aProcessName, string aModuleName, string aFunctionName)
        {
            var hookingSettings = new HookingSettings();
            hookingSettings.Add(aProcessName, aModuleName, aFunctionName);

            return hookingSettings;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        public static HookingSettings With(string aProcessName, string aModuleName, string aFunctionName)
        {
            var hookingSettings = new HookingSettings();

            hookingSettings.Add(aProcessName, aModuleName, aFunctionName);

            return(hookingSettings);
        }
Ejemplo n.º 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;
        }