Esempio n. 1
0
 public void SetFromRawData(Interstellar.ConfigurationReader.Endpoint endpoint, ConfigurationContext repository)
 {
     CreateParameter("Address", endpoint.Address, repository);
     CreateParameter("Audience", endpoint.Audience, repository);
     CreateParameter("CertificateValidationMode", endpoint.CertificateValidationMode, repository);
     CreateParameter("CloseTimeout", endpoint.CloseTimeout, repository);
     CreateParameter("Durable", endpoint.Durable, repository);
     CreateParameter("ExactlyOnce", endpoint.ExactlyOnce, repository);
     CreateParameter("Ignore", endpoint.Ignore, repository);
     CreateParameter("IssuerActAsAddress", endpoint.IssuerActAsAddress, repository);
     CreateParameter("HostNameComparisonMode", endpoint.HostNameComparisonMode, repository);
     CreateParameter("IssuerAddress", endpoint.IssuerAddress, repository);
     CreateParameter("IssuerMetadataAddress", endpoint.IssuerMetadataAddress, repository);
     CreateParameter("IssuerName", endpoint.IssuerName, repository);
     CreateParameter("MaxBufferPoolSize", endpoint.MaxBufferPoolSize, repository);
     CreateParameter("MaxBufferSize", endpoint.MaxBufferSize, repository);
     CreateParameter("MaxConnections", endpoint.MaxConnections, repository);
     CreateParameter("MaxMessageSize", endpoint.MaxMessageSize, repository);
     CreateParameter("MaxReceivedSize", endpoint.MaxReceivedSize, repository);
     CreateParameter("MessageFormat", endpoint.MessageFormat, repository);
     CreateParameter("TransferMode", endpoint.TransferMode, repository);
     CreateParameter("OpenTimeout", endpoint.OpenTimeout, repository);
     CreateParameter("OverrideSslSecurity", endpoint.OverrideSslSecurity, repository);
     CreateParameter("ReceiveTimeout", endpoint.ReceiveTimeout, repository);
     CreateParameter("SendTimeout", endpoint.SendTimeout, repository);
     CreateParameter("StsAddress", endpoint.StsAddress, repository);
     CreateParameter("TextEncoding", endpoint.TextEncoding, repository);
     CreateParameter("Thumbprint", endpoint.Thumbprint, repository);
 }
Esempio n. 2
0
        public override bool OnFrameImpl()
        {
            if (substate != null)
            {
                if (substate.OnFrame())
                {
                    return(true);
                }
            }

            // check if we're done
            if (g.me.InStation && g.me.StationID == station_id)
            {
                SetDone("Reached destination");
                return(false);
            }
            // check if we're in the right solar system and just need to dock
            else if (g.me.InSpace && g.me.SolarSystemID == solarsystem_id)
            {
                substate = new DockState(station_id);
                substate.OnFrame();
                return(true);
            }
            // if we're in station, undock
            else if (g.me.InStation)
            {
                substate = new UndockState();
                substate.OnFrame();
                return(true);
            }
            // if we're out in space, move to the next solarsystem
            else if (g.me.InSpace)
            {
                // set our destination if its not already correct
                List <int> systems = g.eve.GetToDestinationPath();
                if (systems == null || systems.Count == 0 ||
                    systems[systems.Count - 1] != solarsystem_id)
                {
                    Universe.ByID(solarsystem_id).SetDestination();
                }

                systems = g.eve.GetToDestinationPath();
                Interstellar  next_system = Universe.ByID(systems[0]);
                List <Entity> entities    = g.eve.QueryEntities("GroupID = 10");
                Entity        next_gate   = null;
                foreach (Entity stargate in entities)
                {
                    if (stargate.Name.Contains(next_system.Name))
                    {
                        next_gate = stargate;
                    }
                }

                if (next_gate != null)
                {
                    substate = new JumpState(next_gate.ID, systems[0]);
                    substate.OnFrame();
                    return(true);
                }
            }

            // I guess we'll just wait hehe
            return(true);
        }
 private static string GetConnectionString(Interstellar.ConfigurationReader.CacheSettings caceSettings)
 {
     return string.Format(connectionStringFormat, caceSettings.MachineNames, caceSettings.Secure.ToString().ToLower(), caceSettings.PassPhrase);
 }