public static bool IsInSync(Tag tag, Tag authorative) { if (tag.Id != authorative.Id) { return(false); } if (tag.Name != authorative.Name) { return(false); } if (!ApimUtils.ListsAreEqual(tag.ApiIds, authorative.ApiIds)) { return(false); } if (!ApimUtils.ListsAreEqual(tag.ProductIds, authorative.ProductIds)) { return(false); } if (!ApimUtils.ListsAreEqual(tag.Descriptions, authorative.Descriptions)) { return(false); } if (!ApimUtils.ListsAreEqual(tag.OperationIds, authorative.OperationIds)) { return(false); } return(true); }
public static bool IsInSync(Product product, Product authorative, bool syncGroups) { if (product.Id != authorative.Id) { return(false); } if (product.Name != authorative.Name) { return(false); } if (product.RefDescription != authorative.RefDescription) { return(false); } if (product.Terms != authorative.Terms) { return(false); } if (product.SubscriptionRequired != authorative.SubscriptionRequired) { return(false); } if (product.ApprovalRequired != authorative.ApprovalRequired) { return(false); } if (product.SubscriptionsLimit != authorative.SubscriptionsLimit) { return(false); } if (product.State != authorative.State) { return(false); } if (syncGroups && !ApimUtils.ListsAreEqual(product.RefsGroups, authorative.RefsGroups)) { return(false); } if (!ApimUtils.ListsAreEqual(product.RefsApis, authorative.RefsApis)) { return(false); } return(true); }