Esempio n. 1
0
        /// <summary>
        /// Inventory Groups.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Groups.</returns>
        private static BagCollection <InvGroups> Groups()
        {
            IndexedCollection <InvGroups> collection = new IndexedCollection <InvGroups>();

            foreach (invGroups group in s_context.invGroups)
            {
                InvGroups item = new InvGroups
                {
                    ID                   = group.groupID,
                    Name                 = group.groupName,
                    UseBasePrice         = group.useBasePrice,
                    Anchored             = group.anchored,
                    Anchorable           = group.anchorable,
                    FittableNonSingleton = group.fittableNonSingleton
                };

                if (group.published.HasValue)
                {
                    item.Published = group.published.Value;
                }

                if (group.categoryID.HasValue)
                {
                    item.CategoryID = group.categoryID.Value;
                }

                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 2
0
        /// <summary>
        /// Character Factions.
        /// </summary>
        /// <returns><c>BagCollection</c> of Character Factions.</returns>
        private static BagCollection <ChrFactions> Factions()
        {
            IndexedCollection <ChrFactions> collection = new IndexedCollection <ChrFactions>();

            foreach (chrFactions faction in s_context.chrFactions)
            {
                ChrFactions item = new ChrFactions
                {
                    ID                   = faction.factionID,
                    FactionName          = faction.factionName,
                    Description          = faction.description,
                    MilitiaCorporationID = faction.militiaCorporationID,
                };

                item.Description = item.Description.Clean();

                if (faction.raceIDs.HasValue)
                {
                    item.RaceID = faction.raceIDs.Value;
                }

                if (faction.solarSystemID.HasValue)
                {
                    item.SolarSystemID = faction.solarSystemID.Value;
                }

                if (faction.corporationID.HasValue)
                {
                    item.CorporationID = faction.corporationID.Value;
                }

                if (faction.sizeFactor.HasValue)
                {
                    item.SizeFactor = faction.sizeFactor.Value;
                }

                // TODO - Fix these...
                if (faction.stationCount.HasValue)
                {
                    item.StationCount = (short)faction.stationCount.Value;
                }

                if (faction.stationSystemCount.HasValue)
                {
                    item.StationSystemCount = (short)faction.stationSystemCount.Value;
                }

                if (faction.iconID.HasValue)
                {
                    item.IconID = faction.iconID.Value;
                }

                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 3
0
        /// <summary>
        /// Inventory Names.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Names.</returns>
        private static BagCollection <InvNames> Names()
        {
            IndexedCollection <InvNames> collection = new IndexedCollection <InvNames>();

            foreach (InvNames item in s_context.invNames.Select(
                         name => new InvNames
            {
                ID = (int)name.itemID,
                Name = name.itemName
            }))
            {
                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 4
0
        /// <summary>
        /// Agent Agent Types.
        /// </summary>
        /// <returns><c>BagCollection</c> of Agent Agent Types.</returns>
        private static BagCollection <AgtAgentTypes> AgentTypes()
        {
            IndexedCollection <AgtAgentTypes> collection = new IndexedCollection <AgtAgentTypes>();

            foreach (AgtAgentTypes item in s_context.agtAgentTypes.Select(
                         agentType => new AgtAgentTypes
            {
                ID = agentType.agentTypeID,
                AgentType = agentType.agentType
            }))
            {
                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 5
0
        /// <summary>
        /// Agent Research Agents.
        /// </summary>
        /// <returns><c>BagCollection</c> of Agent Research Agents.</returns>
        private static BagCollection <AgtResearchAgents> ResearchAgents()
        {
            IndexedCollection <AgtResearchAgents> collection = new IndexedCollection <AgtResearchAgents>();

            foreach (AgtResearchAgents item in s_context.agtResearchAgents.Select(
                         researchAgent => new AgtResearchAgents
            {
                ID = researchAgent.agentID,
                ResearchSkillID = researchAgent.typeID
            }))
            {
                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 6
0
        /// <summary>
        /// Corporation NPC Divisions.
        /// </summary>
        /// <returns><c>BagCollection</c> of Corporation NPC Divisions.</returns>
        private static BagCollection <CrpNPCDivisions> NPCDivisions()
        {
            IndexedCollection <CrpNPCDivisions> collection = new IndexedCollection <CrpNPCDivisions>();

            foreach (CrpNPCDivisions item in s_context.crpNPCDivisions.Select(
                         npcDivision => new CrpNPCDivisions
            {
                ID = npcDivision.divisionID,
                DivisionName = npcDivision.divisionName
            }))
            {
                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 7
0
        /// <summary>
        /// EVE Icons.
        /// </summary>
        /// <returns><c>BagCollection</c> of EVE icons.</returns>
        private static BagCollection <EveIcons> Icons()
        {
            IndexedCollection <EveIcons> collection = new IndexedCollection <EveIcons>();

            foreach (EveIcons item in s_context.eveIcons.Select(
                         icon => new EveIcons
            {
                ID = icon.iconID,
                Icon = icon.iconFile
            }))
            {
                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 8
0
        /// <summary>
        /// Inventory Control Tower Resource Purposes.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Control Tower Resource Purposes.</returns>
        private static BagCollection <InvControlTowerResourcePurposes> ControlTowerResourcePurposes()
        {
            IndexedCollection <InvControlTowerResourcePurposes> collection =
                new IndexedCollection <InvControlTowerResourcePurposes>();

            foreach (InvControlTowerResourcePurposes item in s_context.invControlTowerResourcePurposes.Select(
                         resource => new InvControlTowerResourcePurposes
            {
                ID = resource.purpose,
                PurposeName = resource.purposeText,
            }))
            {
                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 9
0
        /// <summary>
        /// Agent Agents.
        /// </summary>
        /// <returns><c>BagCollection</c> of Agent Agents.</returns>
        private static BagCollection <AgtAgents> Agents()
        {
            IndexedCollection <AgtAgents> collection = new IndexedCollection <AgtAgents>();

            foreach (agtAgents agent in s_context.agtAgents)
            {
                AgtAgents item = new AgtAgents
                {
                    ID = agent.agentID,
                };

                if (agent.divisionID.HasValue)
                {
                    item.DivisionID = agent.divisionID.Value;
                }

                if (agent.locationID.HasValue)
                {
                    item.LocationID = agent.locationID.Value;
                }

                if (agent.level.HasValue)
                {
                    item.Level = agent.level.Value;
                }

                if (agent.quality.HasValue)
                {
                    item.Quality = agent.quality.Value;
                }

                if (agent.agentTypeID.HasValue)
                {
                    item.AgentTypeID = agent.agentTypeID.Value;
                }

                if (agent.isLocator.HasValue)
                {
                    item.IsLocator = agent.isLocator.Value;
                }

                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 10
0
        /// <summary>
        /// Inventory Flags.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Flags.</returns>
        private static BagCollection <InvFlags> Flags()
        {
            IndexedCollection <InvFlags> collection = new IndexedCollection <InvFlags>();

            foreach (InvFlags item in s_context.invFlags.Select(
                         flag => new InvFlags
            {
                ID = flag.flagID,
                Name = flag.flagName,
                Text = flag.flagText,
            }))
            {
                item.Text = item.Text.Clean();
                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 11
0
        /// <summary>
        /// Dogma Attribute Types.
        /// </summary>
        /// <returns><c>BagCollection</c> of Dogma Attribute Types.</returns>
        private static BagCollection <DgmAttributeTypes> AttributeTypes()
        {
            IndexedCollection <DgmAttributeTypes> collection = new IndexedCollection <DgmAttributeTypes>();

            foreach (dgmAttributeTypes attribute in s_context.dgmAttributeTypes)
            {
                DgmAttributeTypes item = new DgmAttributeTypes
                {
                    ID          = attribute.attributeID,
                    CategoryID  = attribute.categoryID,
                    Description = attribute.description,
                    DisplayName = attribute.displayName,
                    IconID      = attribute.iconID,
                    Name        = attribute.attributeName,
                    UnitID      = attribute.unitID,
                };

                item.Description = item.Description.Clean();
                item.DisplayName = item.DisplayName.Clean();
                item.Name        = item.Name.Clean();

                if (attribute.defaultValue.HasValue)
                {
                    item.DefaultValue = attribute.defaultValue.Value.ToString(CultureInfo.InvariantCulture);
                }

                if (attribute.published.HasValue)
                {
                    item.Published = attribute.published.Value;
                }

                if (attribute.highIsGood.HasValue)
                {
                    item.HigherIsBetter = attribute.highIsGood.Value;
                }

                collection.Items.Add(item);
            }

            // Set properties total count
            PropertiesTotalCount = collection.Items.Count;

            return(collection.ToBag());
        }
Esempio n. 12
0
        /// <summary>
        /// Map Regions.
        /// </summary>
        /// <returns><c>BagCollection</c> of Map Regions.</returns>
        /// <remarks>Regions in the EVE Universe.</remarks>
        private static BagCollection <MapRegions> Regions()
        {
            IndexedCollection <MapRegions> collection = new IndexedCollection <MapRegions>();

            foreach (MapRegions item in s_context.mapRegions.Select(
                         region => new MapRegions
            {
                ID = region.regionID,
                Name = region.regionName,
                FactionID = region.factionID
            }))
            {
                collection.Items.Add(item);
            }

            GeographyTotalCount = collection.Items.Count;

            return(collection.ToBag());
        }
Esempio n. 13
0
        /// <summary>
        /// Map Solar Systems.
        /// </summary>
        /// <returns><c>BagCollection</c> of Map Solar Systems.</returns>
        private static BagCollection <MapSolarSystems> SolarSystems()
        {
            IndexedCollection <MapSolarSystems> collection = new IndexedCollection <MapSolarSystems>();

            foreach (mapSolarSystems solarsystem in s_context.mapSolarSystems)
            {
                MapSolarSystems item = new MapSolarSystems
                {
                    ID   = solarsystem.solarSystemID,
                    Name = solarsystem.solarSystemName
                };

                if (solarsystem.constellationID.HasValue)
                {
                    item.ConstellationID = solarsystem.constellationID.Value;
                }

                if (solarsystem.security.HasValue)
                {
                    item.SecurityLevel = (float)solarsystem.security.Value;
                }

                if (solarsystem.x.HasValue)
                {
                    item.X = solarsystem.x.Value;
                }

                if (solarsystem.y.HasValue)
                {
                    item.Y = solarsystem.y.Value;
                }

                if (solarsystem.z.HasValue)
                {
                    item.Z = solarsystem.z.Value;
                }

                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 14
0
        /// <summary>
        /// Dogma Attribute categories.
        /// </summary>
        /// <returns><c>BagCollection</c> of Dogma Attribute Categories.</returns>
        private static BagCollection <DgmAttributeCategories> AttributeCategories()
        {
            IndexedCollection <DgmAttributeCategories> collection = new IndexedCollection <DgmAttributeCategories>();

            foreach (DgmAttributeCategories item in s_context.dgmAttributeCategories.Select(
                         category => new DgmAttributeCategories
            {
                ID = category.categoryID,
                Description = category.categoryDescription,
                Name = category.categoryName
            }))
            {
                item.Description = item.Description.Clean();
                item.Name        = item.Name.Clean();

                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 15
0
        /// <summary>
        /// Inventory Market Groups.
        /// </summary>
        /// <returns><c>BagCollection</c> of Market Groups available on the market.</returns>
        private static BagCollection <InvMarketGroups> MarketGroups()
        {
            IndexedCollection <InvMarketGroups> collection = new IndexedCollection <InvMarketGroups>();

            foreach (InvMarketGroups item in s_context.invMarketGroups.Select(
                         marketGroup => new InvMarketGroups
            {
                ID = marketGroup.marketGroupID,
                Description = marketGroup.description,
                IconID = marketGroup.iconID,
                Name = marketGroup.marketGroupName,
                ParentID = marketGroup.parentGroupID
            }))
            {
                item.Description = item.Description.Clean();

                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 16
0
        /// <summary>
        /// EVE Units.
        /// </summary>
        /// <returns><c>BagCollection</c> of EVE Units.</returns>
        private static BagCollection <EveUnits> Units()
        {
            IndexedCollection <EveUnits> collection = new IndexedCollection <EveUnits>();

            foreach (EveUnits item in s_context.eveUnits.Select(
                         unit => new EveUnits
            {
                Description = unit.description,
                DisplayName = unit.displayName,
                ID = unit.unitID,
                Name = unit.unitName
            }))
            {
                item.Description = item.Description.Clean();
                item.DisplayName = item.DisplayName.Clean();

                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 17
0
        /// <summary>
        /// Dogma Traits.
        /// </summary>
        /// <returns></returns>
        private static BagCollection <InvTraits> Traits()
        {
            IndexedCollection <InvTraits> collection = new IndexedCollection <InvTraits>();

            foreach (InvTraits item in s_context.invTraits.Select(
                         trait => new InvTraits
            {
                ID = trait.traitID,
                skillID = trait.skillID,
                typeID = trait.typeID,
                bonus = trait.bonus,
                BonusText = trait.BonusText,
                UnitID = trait.unitID
            }))
            {
                item.BonusText = item.BonusText.Clean();

                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 18
0
        /// <summary>
        /// Map Constellations.
        /// </summary>
        /// <returns><c>BagCollection</c> of Map Constellations.</returns>
        /// <remarks>Constallations in the EVE Universe.</remarks>
        private static BagCollection <MapConstellations> Constellations()
        {
            IndexedCollection <MapConstellations> collection = new IndexedCollection <MapConstellations>();

            foreach (mapConstellations constellation in s_context.mapConstellations)
            {
                MapConstellations item = new MapConstellations
                {
                    ID   = constellation.constellationID,
                    Name = constellation.constellationName,
                };

                if (constellation.regionID.HasValue)
                {
                    item.RegionID = constellation.regionID.Value;
                }

                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 19
0
        /// <summary>
        /// Inventory Categories.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Categories.</returns>
        private static BagCollection <InvCategories> Categories()
        {
            IndexedCollection <InvCategories> collection = new IndexedCollection <InvCategories>();

            foreach (invCategories category in s_context.invCategories)
            {
                InvCategories item = new InvCategories
                {
                    ID     = category.categoryID,
                    Name   = category.categoryName,
                    IconID = category.iconID
                };

                if (category.published.HasValue)
                {
                    item.Published = category.published.Value;
                }

                collection.Items.Add(item);
            }

            return(collection.ToBag());
        }
Esempio n. 20
0
        /// <summary>
        /// Agent Research Agents.
        /// </summary>
        /// <returns><c>BagCollection</c> of Agent Research Agents.</returns>
        private static BagCollection<AgtResearchAgents> ResearchAgents()
        {
            IndexedCollection<AgtResearchAgents> collection = new IndexedCollection<AgtResearchAgents>();

            foreach (AgtResearchAgents item in s_context.agtResearchAgents.Select(
                researchAgent => new AgtResearchAgents
                {
                    ID = researchAgent.agentID,
                    ResearchSkillID = researchAgent.typeID
                }))
            {
                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 21
0
        /// <summary>
        /// Agent Agent Types.
        /// </summary>
        /// <returns><c>BagCollection</c> of Agent Agent Types.</returns>
        private static BagCollection<AgtAgentTypes> AgentTypes()
        {
            IndexedCollection<AgtAgentTypes> collection = new IndexedCollection<AgtAgentTypes>();

            foreach (AgtAgentTypes item in s_context.agtAgentTypes.Select(
                agentType => new AgtAgentTypes
                {
                    ID = agentType.agentTypeID,
                    AgentType = agentType.agentType
                }))
            {
                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 22
0
        /// <summary>
        /// Inventory Types.
        /// </summary>
        /// <returns><c>BagCollection</c> of items from the Inventory.</returns>
        private static BagCollection<InvTypes> Types()
        {
            IndexedCollection<InvTypes> collection = new IndexedCollection<InvTypes>();

            foreach (invTypes type in s_context.invTypes)
            {
                InvTypes item = new InvTypes
                {
                    ID = type.typeID,
                    Description = type.description,
                    MarketGroupID = type.marketGroupID,
                    Name = type.typeName,
                    RaceID = type.raceID
                };
                item.Description = item.Description.Clean();

                if (type.basePrice.HasValue)
                    item.BasePrice = type.basePrice.Value;

                if (type.capacity.HasValue)
                    item.Capacity = type.capacity.Value;

                if (type.groupID.HasValue)
                    item.GroupID = type.groupID.Value;

                if (type.mass.HasValue)
                    item.Mass = type.mass.Value;

                if (type.published.HasValue)
                    item.Published = type.published.Value;

                if (type.volume.HasValue)
                    item.Volume = type.volume.Value;

                if (type.portionSize.HasValue)
                    item.PortionSize = type.portionSize.Value;

                collection.Items.Add(item);
            }

            // Set items total count
            ItemsTotalCount = ReprocessingTotalCount = collection.Items.Count;

            // Set skills total count
            SkillsTotalCount = collection.Items.Count(
                item => item.GroupID != DBConstants.FakeSkillsGroupID &&
                        InvGroupsTable[item.GroupID].CategoryID == DBConstants.SkillCategoryID);

            return collection.ToBag();
        }
Esempio n. 23
0
        /// <summary>
        /// Inventory Types.
        /// </summary>
        /// <returns><c>BagCollection</c> of items from the Inventory.</returns>
        private static BagCollection <InvTypes> Types()
        {
            IndexedCollection <InvTypes> collection = new IndexedCollection <InvTypes>();

            foreach (invTypes type in s_context.invTypes)
            {
                InvTypes item = new InvTypes
                {
                    ID            = type.typeID,
                    Description   = type.description,
                    MarketGroupID = type.marketGroupID,
                    Name          = type.typeName,
                    RaceID        = type.raceID
                };
                item.Description = item.Description.Clean();

                if (type.basePrice.HasValue)
                {
                    item.BasePrice = type.basePrice.Value;
                }

                if (type.capacity.HasValue)
                {
                    item.Capacity = type.capacity.Value;
                }

                if (type.groupID.HasValue)
                {
                    item.GroupID = type.groupID.Value;
                }

                if (type.mass.HasValue)
                {
                    item.Mass = type.mass.Value;
                }

                if (type.published.HasValue)
                {
                    item.Published = type.published.Value;
                }

                if (type.volume.HasValue)
                {
                    item.Volume = type.volume.Value;
                }

                if (type.portionSize.HasValue)
                {
                    item.PortionSize = type.portionSize.Value;
                }

                collection.Items.Add(item);
            }

            // Set items total count
            ItemsTotalCount = ReprocessingTotalCount = collection.Items.Count;

            // Set skills total count
            SkillsTotalCount = collection.Items.Count(
                item => item.GroupID != DBConstants.FakeSkillsGroupID &&
                InvGroupsTable[item.GroupID].CategoryID == DBConstants.SkillCategoryID);

            return(collection.ToBag());
        }
Esempio n. 24
0
        /// <summary>
        /// Dogma Attribute categories.
        /// </summary>
        /// <returns><c>BagCollection</c> of Dogma Attribute Categories.</returns>
        private static BagCollection<DgmAttributeCategories> AttributeCategories()
        {
            IndexedCollection<DgmAttributeCategories> collection = new IndexedCollection<DgmAttributeCategories>();

            foreach (DgmAttributeCategories item in s_context.dgmAttributeCategories.Select(
                category => new DgmAttributeCategories
                {
                    ID = category.categoryID,
                    Description = category.categoryDescription,
                    Name = category.categoryName
                }))
            {
                item.Description = item.Description.Clean();
                item.Name = item.Name.Clean();

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 25
0
        /// <summary>
        /// Character Factions.
        /// </summary>
        /// <returns><c>BagCollection</c> of Character Factions.</returns>
        private static BagCollection<ChrFactions> Factions()
        {
            IndexedCollection<ChrFactions> collection = new IndexedCollection<ChrFactions>();

            foreach (chrFactions faction in s_context.chrFactions)
            {
                ChrFactions item = new ChrFactions
                {
                    ID = faction.factionID,
                    FactionName = faction.factionName,
                    Description = faction.description,
                    MilitiaCorporationID = faction.militiaCorporationID,
                };

                item.Description = item.Description.Clean();

                if (faction.raceIDs.HasValue)
                    item.RaceID = faction.raceIDs.Value;

                if (faction.solarSystemID.HasValue)
                    item.SolarSystemID = faction.solarSystemID.Value;

                if (faction.corporationID.HasValue)
                    item.CorporationID = faction.corporationID.Value;

                if (faction.sizeFactor.HasValue)
                    item.SizeFactor = faction.sizeFactor.Value;

                if (faction.stationCount.HasValue)
                    item.StationCount = faction.stationCount.Value;

                if (faction.stationSystemCount.HasValue)
                    item.StationSystemCount = faction.stationSystemCount.Value;

                if (faction.iconID.HasValue)
                    item.IconID = faction.iconID.Value;

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 26
0
        /// <summary>
        /// Map Solar Systems.
        /// </summary>
        /// <returns><c>BagCollection</c> of Map Solar Systems.</returns>
        private static BagCollection<MapSolarSystems> SolarSystems()
        {
            IndexedCollection<MapSolarSystems> collection = new IndexedCollection<MapSolarSystems>();

            foreach (mapSolarSystems solarsystem in s_context.mapSolarSystems)
            {
                MapSolarSystems item = new MapSolarSystems
                {
                    ID = solarsystem.solarSystemID,
                    Name = solarsystem.solarSystemName
                };

                if (solarsystem.constellationID.HasValue)
                    item.ConstellationID = solarsystem.constellationID.Value;

                if (solarsystem.security.HasValue)
                    item.SecurityLevel = (float)solarsystem.security.Value;

                if (solarsystem.x.HasValue)
                    item.X = solarsystem.x.Value;

                if (solarsystem.y.HasValue)
                    item.Y = solarsystem.y.Value;

                if (solarsystem.z.HasValue)
                    item.Z = solarsystem.z.Value;

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 27
0
        /// <summary>
        /// Inventory Names.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Names.</returns>
        private static BagCollection<InvNames> Names()
        {
            IndexedCollection<InvNames> collection = new IndexedCollection<InvNames>();

            foreach (InvNames item in s_context.invNames.Select(
                name => new InvNames
                {
                    ID = (int)name.itemID,
                    Name = name.itemName
                }))
            {
                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 28
0
        /// <summary>
        /// Certificate Classes.
        /// </summary>
        /// <returns><c>BagCollection</c> of Classes of Certificate.</returns>
        private static BagCollection<CrtClasses> CertificateClasses()
        {
            IndexedCollection<CrtClasses> collection = new IndexedCollection<CrtClasses>();

            foreach (CrtClasses item in s_context.crtClasses.Select(
                crtClass => new CrtClasses
                {
                    ID = crtClass.classID,
                    ClassName = crtClass.className,
                    Description = crtClass.description
                }))
            {
                item.Description = item.Description.Clean();

                collection.Items.Add(item);
            }

            CertificatesTotalCount *= collection.Items.Count();

            return collection.ToBag();
        }
Esempio n. 29
0
        /// <summary>
        /// Certificate Certificates.
        /// </summary>
        /// <returns><c>BagCollection</c> of Certificates.</returns>
        private static BagCollection<CrtCertificates> Certificates()
        {
            IndexedCollection<CrtCertificates> collection = new IndexedCollection<CrtCertificates>();

            foreach (crtCertificates certificate in s_context.crtCertificates)
            {
                CrtCertificates item = new CrtCertificates
                {
                    ID = certificate.certificateID,
                    Description = certificate.description
                };

                item.Description = item.Description.Clean();

                if (certificate.groupID.HasValue)
                    item.GroupID = certificate.groupID.Value;

                if (certificate.classID.HasValue)
                    item.ClassID = certificate.classID.Value;

                if (certificate.grade.HasValue)
                    item.Grade = certificate.grade.Value;

                collection.Items.Add(item);
            }

            CertificatesTotalCount = collection.Items.Select(x => x.GroupID).Distinct().Count();

            return collection.ToBag();
        }
Esempio n. 30
0
        /// <summary>
        /// Inventory Groups.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Groups.</returns>
        private static BagCollection<InvGroups> Groups()
        {
            IndexedCollection<InvGroups> collection = new IndexedCollection<InvGroups>();

            foreach (invGroups group in s_context.invGroups)
            {
                InvGroups item = new InvGroups
                {
                    ID = group.groupID,
                    Name = group.groupName,
                    Description = group.description
                };

                item.Description = item.Description.Clean();

                if (group.published.HasValue)
                    item.Published = group.published.Value;

                if (group.categoryID.HasValue)
                    item.CategoryID = group.categoryID.Value;

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 31
0
        /// <summary>
        /// Certificate Recommendations.
        /// </summary>
        /// <returns><c>BagCollection</c> of Certificate Recommendations.</returns>
        private static BagCollection<CrtRecommendations> CertificateRecommendations()
        {
            IndexedCollection<CrtRecommendations> collection = new IndexedCollection<CrtRecommendations>();

            foreach (crtRecommendations recommendation in s_context.crtRecommendations)
            {
                CrtRecommendations item = new CrtRecommendations
                {
                    ID = recommendation.recommendationID,
                    Level = recommendation.recommendationLevel,
                };

                if (recommendation.certificateID.HasValue)
                    item.CertificateID = recommendation.certificateID.Value;

                if (recommendation.shipTypeID.HasValue)
                    item.ShipTypeID = recommendation.shipTypeID.Value;

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 32
0
        /// <summary>
        /// Dogma Attribute Types.
        /// </summary>
        /// <returns><c>BagCollection</c> of Dogma Attribute Types.</returns>
        private static BagCollection<DgmAttributeTypes> AttributeTypes()
        {
            IndexedCollection<DgmAttributeTypes> collection = new IndexedCollection<DgmAttributeTypes>();

            foreach (dgmAttributeTypes attribute in s_context.dgmAttributeTypes)
            {
                DgmAttributeTypes item = new DgmAttributeTypes
                {
                    ID = attribute.attributeID,
                    CategoryID = attribute.categoryID,
                    Description = attribute.description,
                    DisplayName = attribute.displayName,
                    IconID = attribute.iconID,
                    Name = attribute.attributeName,
                    UnitID = attribute.unitID,
                };

                item.Description = item.Description.Clean();
                item.DisplayName = item.DisplayName.Clean();
                item.Name = item.Name.Clean();

                if (attribute.defaultValue.HasValue)
                    item.DefaultValue = attribute.defaultValue.Value.ToString(CultureInfo.InvariantCulture);

                if (attribute.published.HasValue)
                    item.Published = attribute.published.Value;

                if (attribute.highIsGood.HasValue)
                    item.HigherIsBetter = attribute.highIsGood.Value;

                collection.Items.Add(item);
            }

            // Set properties total count
            PropertiesTotalCount = collection.Items.Count;

            return collection.ToBag();
        }
Esempio n. 33
0
        /// <summary>
        /// Agent Agents.
        /// </summary>
        /// <returns><c>BagCollection</c> of Agent Agents.</returns>
        private static BagCollection<AgtAgents> Agents()
        {
            IndexedCollection<AgtAgents> collection = new IndexedCollection<AgtAgents>();

            foreach (agtAgents agent in s_context.agtAgents)
            {
                AgtAgents item = new AgtAgents
                {
                    ID = agent.agentID,
                };

                if (agent.divisionID.HasValue)
                    item.DivisionID = agent.divisionID.Value;

                if (agent.locationID.HasValue)
                    item.LocationID = agent.locationID.Value;

                if (agent.level.HasValue)
                    item.Level = agent.level.Value;

                if (agent.quality.HasValue)
                    item.Quality = agent.quality.Value;

                if (agent.agentTypeID.HasValue)
                    item.AgentTypeID = agent.agentTypeID.Value;

                if (agent.isLocator.HasValue)
                    item.IsLocator = agent.isLocator.Value;

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 34
0
        /// <summary>
        /// Corporation NPC Divisions.
        /// </summary>
        /// <returns><c>BagCollection</c> of Corporation NPC Divisions.</returns>
        private static BagCollection<CrpNPCDivisions> NPCDivisions()
        {
            IndexedCollection<CrpNPCDivisions> collection = new IndexedCollection<CrpNPCDivisions>();

            foreach (CrpNPCDivisions item in s_context.crpNPCDivisions.Select(
                npcDivision => new CrpNPCDivisions
                {
                    ID = npcDivision.divisionID,
                    DivisionName = npcDivision.divisionName
                }))
            {
                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 35
0
        /// <summary>
        /// Station Stations.
        /// </summary>
        /// <returns><c>BagCollection</c> of Station Stations.</returns>
        /// <remarks>Stations in the EVE Universe.</remarks>
        private static BagCollection<StaStations> Stations()
        {
            IndexedCollection<StaStations> collection = new IndexedCollection<StaStations>();

            foreach (staStations station in s_context.staStations)
            {
                StaStations item = new StaStations
                {
                    ID = station.stationID,
                    Name = station.stationName,
                };

                if (station.reprocessingEfficiency.HasValue)
                    item.ReprocessingEfficiency = (float)station.reprocessingEfficiency.Value;

                if (station.reprocessingStationsTake.HasValue)
                    item.ReprocessingStationsTake = (float)station.reprocessingStationsTake.Value;

                if (station.security.HasValue)
                    item.SecurityLevel = station.security.Value;

                if (station.solarSystemID.HasValue)
                    item.SolarSystemID = station.solarSystemID.Value;

                if (station.corporationID.HasValue)
                    item.CorporationID = station.corporationID.Value;

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 36
0
        /// <summary>
        /// Map Constellations.
        /// </summary>
        /// <returns><c>BagCollection</c> of Map Constellations.</returns>
        /// <remarks>Constallations in the EVE Universe.</remarks>
        private static BagCollection<MapConstellations> Constellations()
        {
            IndexedCollection<MapConstellations> collection = new IndexedCollection<MapConstellations>();

            foreach (mapConstellations constellation in s_context.mapConstellations)
            {
                MapConstellations item = new MapConstellations
                {
                    ID = constellation.constellationID,
                    Name = constellation.constellationName,
                };

                if (constellation.regionID.HasValue)
                    item.RegionID = constellation.regionID.Value;

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 37
0
        /// <summary>
        /// Inventory Market Groups.
        /// </summary>
        /// <returns><c>BagCollection</c> of Market Groups available on the market.</returns>
        private static BagCollection<InvMarketGroups> MarketGroups()
        {
            IndexedCollection<InvMarketGroups> collection = new IndexedCollection<InvMarketGroups>();

            foreach (InvMarketGroups item in s_context.invMarketGroups.Select(
                marketGroup => new InvMarketGroups
                {
                    ID = marketGroup.marketGroupID,
                    Description = marketGroup.description,
                    IconID = marketGroup.iconID,
                    Name = marketGroup.marketGroupName,
                    ParentID = marketGroup.parentGroupID
                }))
            {
                item.Description = item.Description.Clean();

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 38
0
        /// <summary>
        /// Certificate Relationships.
        /// </summary>
        /// <returns><c>BagCollection</c> of parent-child relationships between certificates.</returns>
        private static BagCollection<CrtRelationships> CertificateRelationships()
        {
            IndexedCollection<CrtRelationships> collection = new IndexedCollection<CrtRelationships>();

            foreach (crtRelationships relationship in s_context.crtRelationships)
            {
                CrtRelationships item = new CrtRelationships
                {
                    ID = relationship.relationshipID,
                    ParentID = relationship.parentID,
                };

                if (relationship.parentLevel.HasValue)
                    item.ParentLevel = relationship.parentLevel.Value;

                if (relationship.parentTypeID.HasValue)
                    item.ParentTypeID = relationship.parentTypeID.Value;

                if (relationship.childID.HasValue)
                    item.ChildID = relationship.childID.Value;

                if (relationship.grade.HasValue)
                    item.Grade = relationship.grade.Value;

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 39
0
        /// <summary>
        /// Inventory Flags.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Flags.</returns>
        private static BagCollection<InvFlags> Flags()
        {
            IndexedCollection<InvFlags> collection = new IndexedCollection<InvFlags>();

            foreach (InvFlags item in s_context.invFlags.Select(
                flag => new InvFlags
                {
                    ID = flag.flagID,
                    Name = flag.flagName,
                    Text = flag.flagText,
                }))
            {
                item.Text = item.Text.Clean();
                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 40
0
        /// <summary>
        /// Inventory Control Tower Resource Purposes.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Control Tower Resource Purposes.</returns>
        private static BagCollection<InvControlTowerResourcePurposes> ControlTowerResourcePurposes()
        {
            IndexedCollection<InvControlTowerResourcePurposes> collection =
                new IndexedCollection<InvControlTowerResourcePurposes>();

            foreach (InvControlTowerResourcePurposes item in s_context.invControlTowerResourcePurposes.Select(
                resource => new InvControlTowerResourcePurposes
                {
                    ID = resource.purpose,
                    PurposeName = resource.purposeText,
                }))
            {
                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 41
0
        /// <summary>
        /// EVE Units.
        /// </summary>
        /// <returns><c>BagCollection</c> of EVE Units.</returns>
        private static BagCollection<EveUnits> Units()
        {
            IndexedCollection<EveUnits> collection = new IndexedCollection<EveUnits>();

            foreach (EveUnits item in s_context.eveUnits.Select(
                unit => new EveUnits
                {
                    Description = unit.description,
                    DisplayName = unit.displayName,
                    ID = unit.unitID,
                    Name = unit.unitName
                }))
            {
                item.Description = item.Description.Clean();
                item.DisplayName = item.DisplayName.Clean();

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 42
0
        /// <summary>
        /// Inventory Blueprint Types.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Blueprint Types.</returns>
        private static BagCollection<InvBlueprintTypes> BlueprintTypes()
        {
            IndexedCollection<InvBlueprintTypes> collection = new IndexedCollection<InvBlueprintTypes>();

            foreach (invBlueprintTypes blueprint in s_context.invBlueprintTypes)
            {
                InvBlueprintTypes item = new InvBlueprintTypes
                {
                    ID = blueprint.blueprintTypeID,
                    ParentID = blueprint.parentBlueprintTypeID,
                };

                if (blueprint.productTypeID.HasValue)
                    item.ProductTypeID = blueprint.productTypeID.Value;

                if (blueprint.productionTime.HasValue)
                    item.ProductionTime = blueprint.productionTime.Value;

                if (blueprint.techLevel.HasValue)
                    item.TechLevel = blueprint.techLevel.Value;

                if (blueprint.researchProductivityTime.HasValue)
                    item.ResearchProductivityTime = blueprint.researchProductivityTime.Value;

                if (blueprint.researchMaterialTime.HasValue)
                    item.ResearchMaterialTime = blueprint.researchMaterialTime.Value;

                if (blueprint.researchCopyTime.HasValue)
                    item.ResearchCopyTime = blueprint.researchCopyTime.Value;

                if (blueprint.researchTechTime.HasValue)
                    item.ResearchTechTime = blueprint.researchTechTime.Value;

                if (blueprint.duplicatingTime.HasValue)
                    item.DuplicatingTime = blueprint.duplicatingTime.Value;

                if (blueprint.reverseEngineeringTime.HasValue)
                    item.ReverseEngineeringTime = blueprint.reverseEngineeringTime.Value;

                if (blueprint.inventionTime.HasValue)
                    item.InventionTime = blueprint.inventionTime.Value;

                if (blueprint.productivityModifier.HasValue)
                    item.ProductivityModifier = blueprint.productivityModifier.Value;

                if (blueprint.wasteFactor.HasValue)
                    item.WasteFactor = blueprint.wasteFactor.Value;

                if (blueprint.maxProductionLimit.HasValue)
                    item.MaxProductionLimit = blueprint.maxProductionLimit.Value;

                collection.Items.Add(item);
            }

            BlueprintsTotalCount = collection.Items.Count;

            return collection.ToBag();
        }
Esempio n. 43
0
        /// <summary>
        /// Dogma Masteries.
        /// </summary>
        /// <returns></returns>
        private static BagCollection<DgmMasteries> Masteries()
        {
            IndexedCollection<DgmMasteries> collection = new IndexedCollection<DgmMasteries>();

            foreach (DgmMasteries item in s_context.dgmMasteries.Select(
                mastery => new DgmMasteries
                {
                    ID = mastery.masteryID,
                    CertificateID = mastery.certificateID,
                    Grade = mastery.grade,
                }))
            {
                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 44
0
        /// <summary>
        /// Map Regions.
        /// </summary>
        /// <returns><c>BagCollection</c> of Map Regions.</returns>
        /// <remarks>Regions in the EVE Universe.</remarks>
        private static BagCollection<MapRegions> Regions()
        {
            IndexedCollection<MapRegions> collection = new IndexedCollection<MapRegions>();

            foreach (MapRegions item in s_context.mapRegions.Select(
                region => new MapRegions
                {
                    ID = region.regionID,
                    Name = region.regionName,
                    FactionID = region.factionID
                }))
            {
                collection.Items.Add(item);
            }

            GeographyTotalCount = collection.Items.Count;

            return collection.ToBag();
        }
Esempio n. 45
0
        /// <summary>
        /// Inventory Blueprint Types.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Blueprint Types.</returns>
        private static BagCollection <InvBlueprintTypes> BlueprintTypes()
        {
            IndexedCollection <InvBlueprintTypes> collection = new IndexedCollection <InvBlueprintTypes>();

            foreach (invBlueprintTypes blueprint in s_context.invBlueprintTypes)
            {
                InvBlueprintTypes item = new InvBlueprintTypes
                {
                    ID       = blueprint.blueprintTypeID,
                    ParentID = blueprint.parentBlueprintTypeID,
                };

                if (blueprint.productTypeID.HasValue)
                {
                    item.ProductTypeID = blueprint.productTypeID.Value;
                }

                if (blueprint.productionTime.HasValue)
                {
                    item.ProductionTime = blueprint.productionTime.Value;
                }

                if (blueprint.techLevel.HasValue)
                {
                    item.TechLevel = blueprint.techLevel.Value;
                }

                if (blueprint.researchProductivityTime.HasValue)
                {
                    item.ResearchProductivityTime = blueprint.researchProductivityTime.Value;
                }

                if (blueprint.researchMaterialTime.HasValue)
                {
                    item.ResearchMaterialTime = blueprint.researchMaterialTime.Value;
                }

                if (blueprint.researchCopyTime.HasValue)
                {
                    item.ResearchCopyTime = blueprint.researchCopyTime.Value;
                }

                if (blueprint.researchTechTime.HasValue)
                {
                    item.ResearchTechTime = blueprint.researchTechTime.Value;
                }

                if (blueprint.duplicatingTime.HasValue)
                {
                    item.DuplicatingTime = blueprint.duplicatingTime.Value;
                }

                if (blueprint.reverseEngineeringTime.HasValue)
                {
                    item.ReverseEngineeringTime = blueprint.reverseEngineeringTime.Value;
                }

                if (blueprint.inventionTime.HasValue)
                {
                    item.InventionTime = blueprint.inventionTime.Value;
                }

                if (blueprint.productivityModifier.HasValue)
                {
                    item.ProductivityModifier = blueprint.productivityModifier.Value;
                }

                if (blueprint.wasteFactor.HasValue)
                {
                    item.WasteFactor = blueprint.wasteFactor.Value;
                }

                if (blueprint.maxProductionLimit.HasValue)
                {
                    item.MaxProductionLimit = blueprint.maxProductionLimit.Value;
                }

                collection.Items.Add(item);
            }

            BlueprintsTotalCount = collection.Items.Count;

            return(collection.ToBag());
        }
Esempio n. 46
0
        /// <summary>
        /// Dogma Traits.
        /// </summary>
        /// <returns></returns>
        private static BagCollection<DgmTraits> Traits()
        {
            IndexedCollection<DgmTraits> collection = new IndexedCollection<DgmTraits>();

            foreach (DgmTraits item in s_context.dgmTraits.Select(
                trait => new DgmTraits
                {
                    ID = trait.traitID,
                    BonusText = trait.bonusText,
                    UnitID = trait.unitID
                }))
            {
                item.BonusText = item.BonusText.Clean();

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 47
0
        /// <summary>
        /// EVE Icons.
        /// </summary>
        /// <returns><c>BagCollection</c> of EVE icons.</returns>
        private static BagCollection<EveIcons> Icons()
        {
            IndexedCollection<EveIcons> collection = new IndexedCollection<EveIcons>();

            foreach (EveIcons item in s_context.eveIcons.Select(
                icon => new EveIcons
                {
                    ID = icon.iconID,
                    Icon = icon.iconFile
                }))
            {
                collection.Items.Add(item);
            }

            return collection.ToBag();
        }
Esempio n. 48
0
        /// <summary>
        /// Inventory Categories.
        /// </summary>
        /// <returns><c>BagCollection</c> of Inventory Categories.</returns>
        private static BagCollection<InvCategories> Categories()
        {
            IndexedCollection<InvCategories> collection = new IndexedCollection<InvCategories>();

            foreach (invCategories category in s_context.invCategories)
            {
                InvCategories item = new InvCategories
                {
                    ID = category.categoryID,
                    Name = category.categoryName,
                    Description = category.description,
                    IconID = category.iconID
                };

                if (category.published.HasValue)
                    item.Published = category.published.Value;

                collection.Items.Add(item);
            }

            return collection.ToBag();
        }