Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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);
 }
Ejemplo n.º 5
0
        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);
Ejemplo n.º 8
0
 /// <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);
Ejemplo n.º 10
0
 public void Save(ISharepointServerSource toSpSource) => _updateRepository.Save(toSpSource);
Ejemplo n.º 11
0
 public void TestConnection(ISharepointServerSource resource) => _updateRepository.TestConnection(resource);
Ejemplo n.º 12
0
 public void TestConnection(ISharepointServerSource resource)
 {
     UpdateManagerProxy.TestConnection(resource);
 }
 public void Save(ISharepointServerSource resource)
 {
     _updateRepository.Save(resource);
 }