public WebResourceStrategy(IOrganizationService Conn, FileHeader LocalFileHeader, WebResourceHeader OnlineWebResourceHeader, String webResourcePath) { this.Conn = Conn; this.WebResourcePath = webResourcePath; this.localFileHeader = LocalFileHeader; this.onlineWebResourceHeader = OnlineWebResourceHeader; }
public OnlineAuthorityStrategy( IOrganizationService Conn, FileHeader LocalFileHeader, WebResourceHeader OnlineWebResourceHeader, String webResourcePath) : base(Conn, LocalFileHeader, OnlineWebResourceHeader, webResourcePath) { this.Target = SyncTarget.Local; //var onlineContent = base.RetrieveOnlineWebResource(webResourcePath); //var localContent = base.RetrieveLocalWebResource(webResourcePath); //if (String.IsNullOrWhiteSpace(localContent)) { this.Action = SyncAction.Create; } //else if (String.Compare(onlineContent, localContent, true) != 0) { this.Action = SyncAction.Update; } //else { this.Action = SyncAction.Ignore; } }
public LocalAuthorityWebResourceStrategy( IOrganizationService Conn, FileHeader LocalFileHeader, WebResourceHeader OnlineWebResourceHeader, String webResourcePath) : base(Conn, LocalFileHeader, OnlineWebResourceHeader, webResourcePath) { this.Target = SyncTarget.Online; var onlineContent = base.RetrieveOnlineContent(webResourcePath); var localContent = base.RetrieveLocalContent(webResourcePath); if (null == onlineContent) { this.Action = SyncAction.Create; } else if (String.Compare(onlineContent, localContent) != 0) { this.Action = SyncAction.Update; } else { this.Action = SyncAction.Ignore; } }