/// <summary> /// Verifies the extension rule. /// </summary> /// <param name="context">The Interop service context</param> /// <param name="info">out parameter to return violation information when rule does not pass</param> /// <returns>true if rule passes; false otherwise</returns> public override bool?Verify(ServiceContext context, out ExtensionRuleViolationInfo info) { if (context == null) { throw new ArgumentNullException("context"); } bool svcDocResult = false; bool metadataResult = false; bool errorResponseResult = false; bool feedAndEntryResult = false; ExtensionRuleViolationInfo infoForOne = null; List <ExtensionRuleResultDetail> details = new List <ExtensionRuleResultDetail>(); svcDocResult = VerificationHelper.VerifySvcDoc(context, out infoForOne); if (infoForOne != null) { details.AddRange(infoForOne.Details); } metadataResult = VerificationHelper.VerifyMetadata(context, out infoForOne); if (infoForOne != null) { details.AddRange(infoForOne.Details); } errorResponseResult = VerificationHelper.VerifyError(context, out infoForOne); if (infoForOne != null) { details.AddRange(infoForOne.Details); } feedAndEntryResult = true; //Test Removed - Stuart. Delete this line if the test is restored. //feedAndEntryResult = VerificationHelper.VerifyFeedAndEntry(context, out infoForOne); //if (infoForOne != null) //{ // details.AddRange(infoForOne.Details); //} info = new ExtensionRuleViolationInfo(context.Destination, context.ResponsePayload, details); info.SetDetailsName(this.Name); return(svcDocResult && metadataResult && feedAndEntryResult && errorResponseResult); }