Contains alls information needed to connect to a server. The name is not needed for the connection but can used for client side organisation of login information.
Esempio n. 1
0
 public SessionBuilder(ServerLogin login, Guid loginGuid, string sessionKey, Guid projectGuid)
 {
     Login       = login;
     LoginGuid   = loginGuid;
     SessionKey  = sessionKey;
     ProjectGuid = projectGuid;
 }
Esempio n. 2
0
        public static ISession CreateOrReplaceOldestSession(ServerLogin login)
        {
            Func <IEnumerable <RunningSessionInfo>, RunningSessionInfo> sessionReplacementSelector =
                infos => infos.OrderBy(info => info.LoginDate).First();

            return(CreateOrReplaceSession(login, sessionReplacementSelector));
        }
Esempio n. 3
0
 public SessionBuilder(ServerLogin login, Guid loginGuid, string sessionKey, Guid projectGuid)
 {
     Login = login;
     LoginGuid = loginGuid;
     SessionKey = sessionKey;
     ProjectGuid = projectGuid;
 }
Esempio n. 4
0
 public SmartAPIException(ServerLogin login)
 {
     if (login != null)
     {
         Server = login.Name;
     }
 }
Esempio n. 5
0
 public SmartAPIException(ServerLogin login, SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if (login != null)
     {
         Server = login.Name;
     }
 }
Esempio n. 6
0
 public SmartAPIException(ServerLogin login, string message, Exception innerException)
     : base(message, innerException)
 {
     if (login != null)
     {
         Server = login.Name;
     }
 }
 public BrokenContentClassFolderSharingException(ServerLogin login, IContentClassFolder folder,
                                                 Guid sharedFromProjectGuid, Guid sharedFromFolderGuid)
     : base(login,
         string.Format(
             "Cannot load project/folder information on broken content class folder {0}. Missing project/folder: {1}/{2}",
             folder, sharedFromProjectGuid, sharedFromFolderGuid))
 {
     _sharedFromProjectGuid = sharedFromProjectGuid;
     _sharedFromFolderGuid = sharedFromFolderGuid;
 }
Esempio n. 8
0
 public override void Validate(ServerLogin login, Version actualVersion, string method)
 {
     if (actualVersion < Version)
     {
         string versionNameString = string.IsNullOrEmpty(VersionName) ? "" : " (" + VersionName + ")";
         throw new InvalidServerVersionException(login,
                                                 string.Format(
                                                     "Invalid server version. {0} only works on servers with version greater than or equal {1}{3}, but the current server version is {2}",
                                                     method, Version, actualVersion, versionNameString));
     }
 }
Esempio n. 9
0
 internal FileDataException(ServerLogin login)
     : base(login)
 {
     // Add implementation.
 }
 internal InvalidServerVersionException(ServerLogin server, string message)
     : base(server, message)
 {
 }
Esempio n. 11
0
 public static ISession CreateSession(ServerLogin login)
 {
     return(new Session(login, null));
 }
Esempio n. 12
0
 public static ISession CreateOrReplaceSession(ServerLogin login,
                                               Func <IEnumerable <RunningSessionInfo>, RunningSessionInfo>
                                               sessionReplacementSelector)
 {
     return(new Session(login, sessionReplacementSelector));
 }
Esempio n. 13
0
 public static ISession CreateOrReplaceOldestSession(ServerLogin login)
 {
     Func<IEnumerable<RunningSessionInfo>, RunningSessionInfo> sessionReplacementSelector =
         infos => infos.OrderBy(info => info.LoginDate).First();
     return CreateOrReplaceSession(login, sessionReplacementSelector);
 }
Esempio n. 14
0
 public static ISession CreateOrReplaceSession(ServerLogin login,
                                               Func<IEnumerable<RunningSessionInfo>, RunningSessionInfo>
                                                   sessionReplacementSelector)
 {
     return new Session(login, sessionReplacementSelector);
 }
Esempio n. 15
0
 internal PageDeletionException(ServerLogin login, string message)
     : base(login, message)
 {
     Error = PageDeletionError.Unknown;
 }
Esempio n. 16
0
 // This constructor is needed for serialization.
 protected FileDataException(ServerLogin login, SerializationInfo info, StreamingContext context)
     : base(login, info, context)
 {
     // Add implementation.
 }
Esempio n. 17
0
 public static ISession CreateSession(ServerLogin login)
 {
     return new Session(login, null);
 }
Esempio n. 18
0
 public Session(ServerLogin login,
                Func<IEnumerable<RunningSessionInfo>, RunningSessionInfo> sessionReplacementSelector)
     : this()
 {
     ServerLogin = login;
     Login(sessionReplacementSelector);
 }
Esempio n. 19
0
 public abstract void Validate(ServerLogin login, Version actualVersion, string method);
Esempio n. 20
0
        /// <summary>
        ///     Create an session object for an already existing session on the server, e.g. when opening a plugin from within a running session.
        /// </summary>
        public Session(ServerLogin login, Guid loginGuid, string sessionKey, Guid projectGuid)
            : this()
        {
            ServerLogin = login;
            _loginGuidStr = loginGuid.ToRQLString();
            _sessionKeyStr = sessionKey;

            InitConnection();
            XmlElement sessionInfo = GetUserSessionInfoElement();
            SelectedProjectGuid = sessionInfo.GetGuid("projectguid");
            SelectProject(projectGuid);
        }
Esempio n. 21
0
 internal FileDataException(ServerLogin login, string message, Exception inner)
     : base(login, message, inner)
 {
     // Add implementation.
 }