private UpdateReferences ( SenseNet.ContentRepository content, bool needToValidate ) : bool | ||
content | SenseNet.ContentRepository | |
needToValidate | bool | |
return | bool |
private static void UpdateReference(int contentId, string metadataPath, bool validate) { var contentInfo = new ContentInfo(metadataPath, null); LogWrite(" "); LogWriteLine(contentInfo.Name); SNC.Content content = SNC.Content.Load(contentId); if (content != null) { try { if (!contentInfo.UpdateReferences(content, validate)) { PrintFieldErrors(content, contentInfo.MetaDataPath); } } catch (Exception e) { PrintException(e, contentInfo.MetaDataPath); } } else { LogWrite("---------- Content does not exist. MetaDataPath: "); LogWrite(contentInfo.MetaDataPath); LogWrite(", ContentId: "); LogWrite(contentInfo.ContentId); LogWrite(", ContentTypeName: "); LogWrite(contentInfo.ContentTypeName); } }
private static void UpdateReference(int contentId, string metadataPath, bool validate) { var contentInfo = new ContentInfo(metadataPath, null); LogWrite(" "); LogWriteLine(contentInfo.Name); SNC.Content content = SNC.Content.Load(contentId); if (content != null) { try { if (!contentInfo.UpdateReferences(content, validate)) PrintFieldErrors(content, contentInfo.MetaDataPath); } catch (Exception e) { PrintException(e, contentInfo.MetaDataPath); } } else { LogWrite("---------- Content does not exist. MetaDataPath: "); LogWrite(contentInfo.MetaDataPath); LogWrite(", ContentId: "); LogWrite(contentInfo.ContentId); LogWrite(", ContentTypeName: "); LogWrite(contentInfo.ContentTypeName); } }