public static bool HasValidLocalKey(BundleEntry entry) { string type = entry.GetResourceTypeName(); Uri id = entry.Id; return Key.IsValidLocalKey(id, type); }
private static void AddMetaData(BsonDocument document, BundleEntry entry) { document[Field.VERSIONID] = entry.Links.SelfLink.ToString(); document[Field.ENTRYTYPE] = entry.TypeName(); document[Field.COLLECTION] = entry.GetResourceTypeName(); document[Field.VERSIONDATE] = GetVersionDate(entry) ?? DateTime.UtcNow; }
private static bool requiresVersionAwareUpdate(BundleEntry entry) { // todo: question: Should this not be implemented somewhere else? (metadata?) /mh // answer: move to Config file. string collection = entry.GetResourceTypeName(); return (collection == "Organization"); }