Ejemplo n.º 1
0
 public static INetCfgComponentBindings ToComponentBindings(this INetCfgComponent instance)
 {
     // ReSharper disable SuspiciousTypeConversion.Global
     // this is legit - c# equivalent of queryinterface com operation
     return((INetCfgComponentBindings)instance);
     // ReSharper restore SuspiciousTypeConversion.Global
 }
Ejemplo n.º 2
0
        public static IEnumNetCfgBindingPath ToBindingPathCollection(this INetCfgComponent instance)
        {
            var bindings = instance.ToComponentBindings();

            object rawBindingPath;

            if (0 != bindings.EnumBindingPaths((int)BindingPathsFlags.Below, out rawBindingPath))
            {
                throw new Exception("Could not retrieve binding paths");
            }

            return((IEnumNetCfgBindingPath)rawBindingPath);
        }