public void TestConnection(ISharepointServerSource resource) { var con = Connection; var comsController = CommunicationControllerFactory.CreateController("TestSharepointServerService"); var serialiser = new Dev2JsonSerializer(); var sharepointSource = new SharepointSource { AuthenticationType = resource.AuthenticationType, Password = resource.Password, Server = resource.Server, UserName = resource.UserName, ResourceName = resource.Name, ResourceID = resource.Id }; comsController.AddPayloadArgument("SharepointServer", serialiser.SerializeToBuilder(sharepointSource)); var output = comsController.ExecuteCommand <SharepointSourceTo>(con, GlobalConstants.ServerWorkspaceID); if (output == null || output.TestMessage.Contains("Failed")) { if (output == null) { throw new WarewolfTestException("No Test Response returned", null); } throw new WarewolfTestException(ErrorResource.UnableToContactServer + " : " + output.TestMessage, null); } resource.IsSharepointOnline = output.IsSharepointOnline; }
public void SharePointServiceSourceDefinition_Equals_SharepointSource_Null_Expected_False() { var sharePointServiceSourceDefinition = new SharePointServiceSourceDefinition(); const ISharepointServerSource sharepointServerSource = null; var isEqual = sharePointServiceSourceDefinition.Equals(sharepointServerSource); Assert.IsFalse(isEqual); }
public void Save(ISharepointServerSource sharePointServiceSource) { try { UpdateManagerProxy.SaveSharePointServiceSource(sharePointServiceSource, GlobalConstants.ServerWorkspaceID); } catch (Exception) { // } }
public bool Equals(ISharepointServerSource other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(string.Equals(Server, other.Server) && string.Equals(UserName, other.UserName) && string.Equals(Password, other.Password) && AuthenticationType == other.AuthenticationType); }
public void SaveSharePointServiceSource(ISharepointServerSource resource, Guid serverWorkspaceID) { var con = Connection; var comsController = CommunicationControllerFactory.CreateController("SaveSharepointServerService"); var serialiser = new Dev2JsonSerializer(); comsController.AddPayloadArgument("SharepointServer", serialiser.SerializeToBuilder(resource)); var output = comsController.ExecuteCommand <IExecuteMessage>(con, GlobalConstants.ServerWorkspaceID); if (output.HasError) { throw new WarewolfSaveException(output.Message.ToString(), null); } }
public bool Equals(ISharepointServerSource other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } var equals = true; equals &= string.Equals(Server, other.Server); equals &= string.Equals(UserName, other.UserName); equals &= string.Equals(Password, other.Password); equals &= AuthenticationType == other.AuthenticationType; return(equals); }
public void TestConnection(ISharepointServerSource sharePointServiceSource) => UpdateManagerProxy.TestConnection(sharePointServiceSource);
/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// <returns> /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false. /// </returns> /// <param name="other">An object to compare with this object.</param> public bool Equals(ISharepointServerSource other) { return(Equals(other as SharePointServiceSourceDefinition)); }
public bool Equals(ISharepointServerSource other) => Equals(other as SharePointServiceSourceDefinition);
public void Save(ISharepointServerSource toSpSource) => _updateRepository.Save(toSpSource);
public void TestConnection(ISharepointServerSource resource) => _updateRepository.TestConnection(resource);
public void TestConnection(ISharepointServerSource resource) { UpdateManagerProxy.TestConnection(resource); }
public void Save(ISharepointServerSource resource) { _updateRepository.Save(resource); }