/// <summary>
        /// Converts a semantic rule extension to Interop Rule object
        /// </summary>
        /// <param name="extension">semantic rule extension</param>
        /// <returns>The Interop Rule object</returns>
        private static Rule CreateRule(ExtensionRule extension)
        {
            Rule rule = new Rule();

            rule.Name                   = extension.Name;
            rule.Category               = extension.Category;
            rule.Description            = extension.Description;
            rule.SpecificationSection   = extension.SpecificationSection;
            rule.V4SpecificationSection = extension.V4SpecificationSection;
            rule.V4Specification        = extension.V4Specification;
            rule.HelpLink               = extension.HelpLink;
            rule.ErrorMessage           = extension.ErrorMessage;
            rule.RequirementLevel       = extension.RequirementLevel;
            rule.Aspect                 = extension.Aspect;
            rule.PayloadType            = extension.PayloadType;
            rule.IsMediaLinkEntry       = extension.IsMediaLinkEntry;
            rule.Projection             = extension.Projection;
            rule.PayloadFormat          = extension.PayloadFormat;
            rule.Version                = extension.Version;
            rule.RequireMetadata        = extension.RequireMetadata;
            rule.RequireServiceDocument = extension.RequireServiceDocument;
            rule.Offline                = extension.IsOfflineContext;
            rule.OdataMetadataType      = extension.OdataMetadataType;
            rule.LevelType              = extension.LevelType;
            rule.ResourceType           = extension.ResourceType;
            rule.DependencyType         = extension.DependencyType;
            if (extension.DependencyType.HasValue && extension.DependencyType.Value == ConformanceDependencyType.Dependency && extension.DependencyInfo != null)
            {
                rule.DependencyInfo = new ConformanceRuleDependencyInfo(extension.DependencyInfo.CheckType, extension.DependencyInfo.RuleRelationship, extension.DependencyInfo.BindingRules);
            }

            rule.Action    = new ExtensionVerifier(extension.Verify);
            rule.Condition = null;

            return(rule);
        }
        /// <summary>
        /// Converts a semantic rule extension to Interop Rule object
        /// </summary>
        /// <param name="extension">semantic rule extension</param>
        /// <returns>The Interop Rule object</returns>
        private static Rule CreateRule(ExtensionRule extension)
        {
            Rule rule = new Rule();
            rule.Name = extension.Name;
            rule.Category = extension.Category;
            rule.Description = extension.Description;
            rule.SpecificationSection = extension.SpecificationSection;
            rule.V4SpecificationSection = extension.V4SpecificationSection;
            rule.V4Specification = extension.V4Specification;
            rule.HelpLink = extension.HelpLink;
            rule.ErrorMessage = extension.ErrorMessage;
            rule.RequirementLevel = extension.RequirementLevel;
            rule.Aspect = extension.Aspect;
            rule.PayloadType = extension.PayloadType;
            rule.IsMediaLinkEntry = extension.IsMediaLinkEntry;
            rule.Projection = extension.Projection;
            rule.PayloadFormat = extension.PayloadFormat;
            rule.Version = extension.Version;
            rule.RequireMetadata = extension.RequireMetadata;
            rule.RequireServiceDocument = extension.RequireServiceDocument;
            rule.Offline = extension.IsOfflineContext;
            rule.OdataMetadataType = extension.OdataMetadataType;
            rule.LevelType = extension.LevelType;
            rule.ResourceType = extension.ResourceType;
            rule.DependencyType = extension.DependencyType;
            if (extension.DependencyType.HasValue && extension.DependencyType.Value == ConformanceDependencyType.Dependency && extension.DependencyInfo != null)
            {
                rule.DependencyInfo = new ConformanceRuleDependencyInfo(extension.DependencyInfo.CheckType, extension.DependencyInfo.RuleRelationship, extension.DependencyInfo.BindingRules);
            }

            rule.Action = new ExtensionVerifier(extension.Verify);
            rule.Condition = null;

            return rule;
        }