private object GetObjectChunkFromId(short id, int offset, int length)
        {
            ResourceManager rm = this;

            while (rm != null)
            {
                object obj = rm.GetObjectInternal(id, offset, length);

                if (obj != null)
                {
                    return(obj);
                }

                if (rm._rmFallback == null)
                {
                    if (rm._cultureName != "")
                    {
                        string          cultureNameParent = GetParentCultureName(rm._cultureName);
                        ResourceManager rmFallback        = new ResourceManager(_baseName, _baseAssembly, cultureNameParent, false);

                        if (rmFallback.IsValid)
                        {
                            rm._rmFallback = rmFallback;
                        }
                    }
                }

                rm = rm._rmFallback;
            }

#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
            throw new ArgumentException();
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
        }
Example #2
0
        private object GetObjectChunkFromId(short id, int offset, int length)
        {
            ResourceManager rm = this;

            while (rm != null)
            {
                object obj = rm.GetObjectInternal(id, offset, length);

                if (obj != null)
                {
                    return(obj);
                }

                if (rm.m_rmFallback == null)
                {
                    if (rm.m_cultureName != "")
                    {
                        string          cultureNameParent = GetParentCultureName(rm.m_cultureName);
                        ResourceManager rmFallback        = new ResourceManager(m_baseName, m_baseAssembly, cultureNameParent, false);

                        if (rmFallback.IsValid)
                        {
                            rm.m_rmFallback = rmFallback;
                        }
                    }
                }

                rm = rm.m_rmFallback;
            }

            throw new ArgumentException();
        }