Пример #1
0
 public ScopeIDContext(ScopeID scopeID, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef, InternalStreamingOdpDynamicMemberLogic memberLogic, RestartMode restartMode)
     : base(restartMode)
 {
     this.m_scopeID     = scopeID;
     this.m_memberDef   = memberDef;
     this.m_memberLogic = memberLogic;
 }
 internal ScopeIDContext(ScopeID scopeID, Microsoft.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef, InternalStreamingOdpDynamicMemberLogic memberLogic, RestartMode restartMode)
     : base(restartMode)
 {
     m_scopeID     = scopeID;
     m_memberDef   = memberDef;
     m_memberLogic = memberLogic;
 }
Пример #3
0
        public bool IsInScope(string pMsgSID, bool IsRealScopeID)
        {
            string pMsgFID    = "";
            bool   TestForFID = false;

            if (IsScopingEnabled && !string.IsNullOrEmpty(FederationID) && !string.IsNullOrEmpty(pMsgSID))
            {
                TestForFID = true;
                string[] t = pMsgSID.Split(';');
                if (t.Length > 1)
                {
                    pMsgSID = t[0];
                    pMsgFID = t[1];
                }
            }
            if (IsRealScopeID)
            {
                return((!IsScopingEnabled && string.IsNullOrEmpty(pMsgSID)) ||
                       (!string.IsNullOrEmpty(ScopeID) && ScopeID.Equals(pMsgSID)) ||
                       (TestForFID && !string.IsNullOrEmpty(FederationID) && FederationID.Equals(GetRealScopeID(pMsgFID)))); //GRSI: rare
            }
            else
            {
                return((!IsScopingEnabled && string.IsNullOrEmpty(pMsgSID)) ||
                       (!string.IsNullOrEmpty(ScopeID) && ScopeID.Equals(GetRealScopeID(pMsgSID))) ||                        //GRSI: rare
                       (TestForFID && !string.IsNullOrEmpty(FederationID) && FederationID.Equals(GetRealScopeID(pMsgFID)))); //GRSI: rare
            }
        }
Пример #4
0
 /// <summary>
 /// In order to tag data with a given ScopeID (Node Realm), this function can be used to get a Hash of the CurrentScopeID.
 /// This hash is not used for any encryption and a scopeID cannot be recreated from this Hash
 /// </summary>
 /// <returns></returns>
 public string GetTokenFromScopeID()
 {
     if (!IsScopingEnabled)
     {
         return("");
     }
     return(ScopeID.GetHashCode().ToString());
 }
Пример #5
0
        public void loadConfigurationOptionsFromMe()
        {
            configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_UUID_NULL_FREE,
                                                "UUID of Region (Default is recommended, random UUID)",
                                                RegionID.ToString(), true);
            configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
                                                "Region Name", RegionName, true);
            configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
                                                "Grid Location (X Axis)", m_regionLocX.ToString(), true);
            configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
                                                "Grid Location (Y Axis)", m_regionLocY.ToString(), true);
            //m_configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false);
            configMember.addConfigurationOption("internal_ip_address",
                                                ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS,
                                                "Internal IP Address for incoming UDP client connections",
                                                m_internalEndPoint.Address.ToString(),
                                                true);
            configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
                                                "Internal IP Port for incoming UDP client connections",
                                                m_internalEndPoint.Port.ToString(), true);
            configMember.addConfigurationOption("allow_alternate_ports",
                                                ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
                                                "Allow sim to find alternate UDP ports when ports are in use?",
                                                m_allow_alternate_ports.ToString(), true);
            configMember.addConfigurationOption("external_host_name",
                                                ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
                                                "External Host Name", m_externalHostName, true);
            configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
                                                "Master Avatar UUID", MasterAvatarAssignedUUID.ToString(), true);
            configMember.addConfigurationOption("master_avatar_first",
                                                ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
                                                "First Name of Master Avatar", MasterAvatarFirstName, true);
            configMember.addConfigurationOption("master_avatar_last",
                                                ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
                                                "Last Name of Master Avatar", MasterAvatarLastName, true);
            configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
                                                "(Sandbox Mode Only)Password for Master Avatar account",
                                                MasterAvatarSandboxPassword, true);
            configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
                                                "Last Map UUID", lastMapUUID.ToString(), true);
            configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
                                                "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true);

            configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
                                                "Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true);

            configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
                                                "Maximum size for physical prims", m_physPrimMax.ToString(), true);

            configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
                                                "Clamp prims to max size", m_clampPrimSize.ToString(), true);

            configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
                                                "Max objects this sim will hold", m_objectCapacity.ToString(), true);

            configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
                                                "Scope ID for this region", ScopeID.ToString(), true);
        }
Пример #6
0
 public override void ResetContext()
 {
     m_isNewContext   = true;
     m_currentContext = -1;
     m_scopeID        = null;
     m_memberDef.DataRegionMemberDefinition.InstanceCount = -1;
     m_memberDef.DataRegionMemberDefinition.InstancePathItem.ResetContext();
     ((IRIFReportDataScope)m_memberDef.ReportScope.RIFReportScope).ClearStreamingScopeInstanceBinding();
 }
Пример #7
0
 public bool TryAddScopeID(ScopeID scopeID, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef, InternalStreamingOdpDynamicMemberLogic memberLogic)
 {
     if (this.IsParentScopeIDAlreadySet(memberDef))
     {
         RestartMode restartMode = (RestartMode)((!this.CanMarkRestartable(memberDef)) ? 1 : 0);
         this.m_queryRestartPosition.Add(new ScopeIDContext(scopeID, memberDef, memberLogic, restartMode));
         return(true);
     }
     return(false);
 }
 internal bool TryAddScopeID(ScopeID scopeID, Microsoft.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef, InternalStreamingOdpDynamicMemberLogic memberLogic)
 {
     if (IsParentScopeIDAlreadySet(memberDef))
     {
         RestartMode restartMode = (!CanMarkRestartable(memberDef)) ? RestartMode.Rom : RestartMode.Query;
         m_queryRestartPosition.Add(new ScopeIDContext(scopeID, memberDef, memberLogic, restartMode));
         return(true);
     }
     return(false);
 }
        public override void ResetContext()
        {
            base.m_isNewContext   = true;
            base.m_currentContext = -1;
            this.m_scopeID        = null;
            this.m_memberDef.DataRegionMemberDefinition.InstanceCount = -1;
            this.m_memberDef.DataRegionMemberDefinition.InstancePathItem.ResetContext();
            IRIFReportDataScope iRIFReportDataScope = (IRIFReportDataScope)this.m_memberDef.ReportScope.RIFReportScope;

            iRIFReportDataScope.ClearStreamingScopeInstanceBinding();
        }
 internal override void SetScopeID(ScopeID scopeID)
 {
     if (m_grouping.IsDetail)
     {
         throw new RenderingObjectModelException(ProcessingErrorCode.rsDetailGroupsNotSupportedInStreamingMode, "SetScopeID");
     }
     if (scopeID == null)
     {
         throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidScopeID, "SetScopeID");
     }
     if (!m_odpContext.QueryRestartInfo.TryAddScopeID(scopeID, m_memberDef.DataRegionMemberDefinition, this))
     {
         throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidScopeIDOrder, m_grouping.Name, "SetScopeID");
     }
 }
Пример #11
0
        public void CreateIConfig(IConfigSource source)
        {
            IConfig config = source.Configs[RegionName];

            if (config != null)
            {
                source.Configs.Remove(config);
            }

            config = source.AddConfig(RegionName);

            config.Set("RegionUUID", RegionID.ToString());

            string location = String.Format("{0},{1}", m_regionLocX / 256, m_regionLocY / 256);

            config.Set("Location", location);

            config.Set("InternalAddress", m_internalEndPoint.Address.ToString());
            config.Set("InternalPort", m_internalEndPoint.Port);

            if (m_objectCapacity != 0)
            {
                config.Set("MaxPrims", m_objectCapacity);
            }

            if (ScopeID != UUID.Zero)
            {
                config.Set("ScopeID", ScopeID.ToString());
            }

            if (RegionType != String.Empty)
            {
                config.Set("RegionType", RegionType);
            }

            config.Set("AllowPhysicalPrims", AllowPhysicalPrims);
            config.Set("AllowScriptCrossing", AllowScriptCrossing);
            config.Set("TrustBinariesFromForeignSims", TrustBinariesFromForeignSims);
            config.Set("SeeIntoThisSimFromNeighbor", SeeIntoThisSimFromNeighbor);
            config.Set("RegionSizeX", RegionSizeX);
            config.Set("RegionSizeY", RegionSizeY);
            config.Set("RegionSizeZ", RegionSizeZ);

            config.Set("StartupType", Startup.ToString());

            config.Set("NeighborPassword", Password.ToString());
        }
Пример #12
0
        public override Dictionary <string, object> ToKVP()
        {
            Dictionary <string, object> result = new Dictionary <string, object>();

            result["FirstName"]   = FirstName;
            result["LastName"]    = LastName;
            result["Email"]       = Email;
            result["PrincipalID"] = PrincipalID.ToString();
            result["ScopeID"]     = ScopeID.ToString();
            result["Created"]     = Created.ToString();
            result["UserLevel"]   = UserLevel.ToString();
            result["UserFlags"]   = UserFlags.ToString();
            result["UserTitle"]   = UserTitle;

            string str = ServiceURLs.Aggregate(string.Empty, (current, kvp) => current + (kvp.Key + "*" + (kvp.Value ?? "") + ";"));

            result["ServiceURLs"] = str;

            return(result);
        }
Пример #13
0
 public bool RomBasedRestart(ScopeID targetScopeID)
 {
     if (targetScopeID == (ScopeID)null)
     {
         return(false);
     }
     try
     {
         IEqualityComparer <object> processingComparer = base.m_odpContext.ProcessingComparer;
         bool result = true;
         while (!targetScopeID.Equals(this.GetScopeID(), processingComparer) && (result = this.MoveNext()))
         {
         }
         return(result);
     }
     catch (Exception)
     {
         throw new RenderingObjectModelException(ProcessingErrorCode.rsRombasedRestartFailedTypeMismatch, base.m_memberDef.Group.Name);
     }
 }
Пример #14
0
        internal override ScopeID GetScopeID()
        {
            if (m_grouping.IsDetail)
            {
                throw new RenderingObjectModelException(ProcessingErrorCode.rsDetailGroupsNotSupportedInStreamingMode, "GetScopeID");
            }
            if (m_scopeID != null)
            {
                return(m_scopeID);
            }
            m_odpContext.SetupContext(m_memberDef.DataRegionMemberDefinition, m_memberDef.ReportScopeInstance);
            IRIFReportDataScope iRIFReportDataScope = (IRIFReportDataScope)m_memberDef.ReportScope.RIFReportScope;

            if (iRIFReportDataScope.IsBoundToStreamingScopeInstance && !iRIFReportDataScope.CurrentStreamingScopeInstance.Value().IsNoRows)
            {
                List <ScopeValue>       list = null;
                IOnDemandMemberInstance onDemandMemberInstance = (IOnDemandMemberInstance)iRIFReportDataScope.CurrentStreamingScopeInstance.Value();
                m_scopeID = new ScopeID(EvaluateSortAndGroupExpressionValues(onDemandMemberInstance.GroupExprValues)?.ToArray());
            }
            return(m_scopeID);
        }
Пример #15
0
        /// <summary>
        /// Returns a short hash from a given Topic. If pTopic is null, the hash of the Scope of the current node is used
        /// </summary>
        /// <param name="pTopic">Subscription topic or ScrambledScopeID</param>
        /// <param name="IsSScope">Set to true if pTopic is a scrambled scopeID</param>
        /// <returns></returns>
        public string GetScopeHash(string pTopic, bool IsSScope = false)
        {
            if (string.IsNullOrEmpty(pTopic))
            {
                return(ScopeID.ToUpper().Substring(0, 4));
            }
            string t;

            if (IsSScope)
            {
                t = GetRealScopeID(pTopic);    //GRSI: Low frequency
            }
            else
            {
                t = FindRealScopeID(pTopic);
            }
            if (!string.IsNullOrEmpty(t) && t.Length > 4)
            {
                return(t.Substring(0, 4).ToUpper());
            }
            return("not scoped");
        }
Пример #16
0
        public string RemoveScopeID(string pCommand, bool IsUnscopedAllowed, bool IsAllowedForeignProcessing)
        {
            if (string.IsNullOrEmpty(pCommand))
            {
                return(pCommand);
            }
            if (!IsScopingEnabled)
            {
                if (IsUnscopedAllowed && pCommand.Contains("@"))
                {
                    return(pCommand.Substring(0, pCommand.IndexOf("@", StringComparison.Ordinal)));
                }
                return(pCommand);
            }
            string tRSID = FindRealScopeID(pCommand);      //GRSI: rare

            if (string.IsNullOrEmpty(tRSID))
            {
                if (IsUnscopedAllowed)
                {
                    return(pCommand);
                }
                return("SCOPEVIOLATION");
            }
            else
            {
                if (!IsAllowedForeignProcessing && !ScopeID.Equals(tRSID))
                {
                    if (string.IsNullOrEmpty(RProSco) || !tRSID.Equals(RProSco))
                    {
                        return("SCOPEVIOLATION");
                    }
                }
                string tC = pCommand.Substring(0, pCommand.IndexOf('@'));
                return(tC);
            }
        }
 protected void ResetScopeID()
 {
     this.m_scopeID = null;
 }
Пример #18
0
 public noder(map <ptr <syntax.PosBase>, ptr <src.PosBase> > basemap = default, ref ptr <syntax.File> file = default, slice <linkname> linknames = default, slice <slice <@string> > pragcgobuf = default, channel <syntax.Error> err = default, ScopeID scope = default, slice <long> scopeVars = default, syntax.Pos lastCloseScopePos = default)
 {
     this.basemap           = basemap;
     this.file              = file;
     this.linknames         = linknames;
     this.pragcgobuf        = pragcgobuf;
     this.err               = err;
     this.scope             = scope;
     this.scopeVars         = scopeVars;
     this.lastCloseScopePos = lastCloseScopePos;
 }
Пример #19
0
 internal abstract void SetScopeID(ScopeID scopeID);
Пример #20
0
 public Mark(src.XPos Pos = default, ScopeID Scope = default)
 {
     this.Pos   = Pos;
     this.Scope = Scope;
 }
Пример #21
0
 public void SetScopeID(ScopeID scopeID)
 {
     this.m_memberLogic.SetScopeID(scopeID);
 }
Пример #22
0
 void IDynamicInstance.SetScopeID(ScopeID scopeID)
 {
     this.SetScopeID(scopeID);
 }
Пример #23
0
 public abstract void SetScopeID(ScopeID scopeID);
Пример #24
0
 public noder(ref ptr <syntax.File> file = default, slice <linkname> linknames = default, @string pragcgobuf = default, channel <syntax.Error> err = default, ScopeID scope = default)
 {
     this.file       = file;
     this.linknames  = linknames;
     this.pragcgobuf = pragcgobuf;
     this.err        = err;
     this.scope      = scope;
 }
Пример #25
0
        private void WriteNiniConfig(IConfigSource source)
        {
            IConfig config = source.Configs[RegionName];

            if (config != null)
            {
                source.Configs.Remove(RegionName);
            }

            config = source.AddConfig(RegionName);

            config.Set("RegionUUID", RegionID.ToString());

            string location = String.Format("{0},{1}", m_regionLocX, m_regionLocY);

            config.Set("Location", location);

            if (DataStore != String.Empty)
            {
                config.Set("Datastore", DataStore);
            }

            config.Set("InternalAddress", m_internalEndPoint.Address.ToString());
            config.Set("InternalPort", m_internalEndPoint.Port);

            config.Set("AllowAlternatePorts", m_allow_alternate_ports.ToString());

            config.Set("ExternalHostName", m_externalHostName);

            if (MasterAvatarAssignedUUID != UUID.Zero)
            {
                config.Set("MasterAvatarUUID", MasterAvatarAssignedUUID.ToString());
            }
            else if (MasterAvatarFirstName != String.Empty && MasterAvatarLastName != String.Empty)
            {
                config.Set("MasterAvatarFirstName", MasterAvatarFirstName);
                config.Set("MasterAvatarLastName", MasterAvatarLastName);
            }
            if (MasterAvatarSandboxPassword != String.Empty)
            {
                config.Set("MasterAvatarSandboxPassword", MasterAvatarSandboxPassword);
            }

            if (m_nonphysPrimMax != 0)
            {
                config.Set("NonphysicalPrimMax", m_nonphysPrimMax);
            }
            if (m_physPrimMax != 0)
            {
                config.Set("PhysicalPrimMax", m_physPrimMax);
            }
            config.Set("ClampPrimSize", m_clampPrimSize.ToString());

            if (m_objectCapacity != 0)
            {
                config.Set("MaxPrims", m_objectCapacity);
            }

            if (ScopeID != UUID.Zero)
            {
                config.Set("ScopeID", ScopeID.ToString());
            }
        }
Пример #26
0
 public scopedPCs(long start = default, long end = default, src.XPos pos = default, ScopeID scope = default)
 {
     this.start = start;
     this.end   = end;
     this.pos   = pos;
     this.scope = scope;
 }
Пример #27
0
 internal override void SetScopeID(ScopeID scopeID)
 {
     throw new RenderingObjectModelException(ProcessingErrorCode.rsNotSupportedInStreamingMode, "SetScopeID");
 }
 internal void SetScopeID(ScopeID scopeID)
 {
     m_memberLogic.SetScopeID(scopeID);
 }