/// <summary>
        /// Validates if the service operation should be visible and is read only. If the service operation
        /// rights are set to None the service operation should not be visible.
        /// </summary>
        /// <param name="serviceOperation">Service operation to be validated.</param>
        /// <returns>Validated service operation, null if the service operation is not supposed to be visible.</returns>
        internal ServiceOperationWrapper ValidateServiceOperation(ServiceOperation serviceOperation)
        {
            DebugUtils.CheckNoExternalCallers();

            ServiceOperationWrapper serviceOperationWrapper = null;

            if (serviceOperation != null)
            {
                // For IDSP, we want to make sure the metadata object instance stay the same within
                // a request because we do reference comparisons.  Note the provider can return
                // different metadata instances within the same request.  The the Validate*() methods
                // will make sure to return the first cached instance.
                if (!this.serviceOperationCache.TryGetValue(serviceOperation.Name, out serviceOperationWrapper))
                {
                    ValidateServiceOperationReadOnly(serviceOperation);
                    serviceOperationWrapper = ServiceOperationWrapper.CreateServiceOperationWrapper(serviceOperation, this.ValidateResourceSet, this.ValidateResourceType);
                    this.serviceOperationCache[serviceOperation.Name] = serviceOperationWrapper;
                }
            }

            return(serviceOperationWrapper);
        }