System.Runtime.Serialization.Formatters.Soap.SoapUtil.GetResourceString C# (CSharp) Method

GetResourceString() static private method

static private GetResourceString ( String key ) : String
key String
return String
		internal static String GetResourceString(String key)
		{
			if (SystemResMgr == null)
				InitResourceManager();
			String s = SystemResMgr.GetString(key, null);
			InternalST.SoapAssert(s!=null, "Managed resource string lookup failed.  Was your resource name misspelled?  Did you rebuild the SoapFormatter and SoapFormatter.resource after adding a resource to SoapFormatter.txt?  Debug this w/ cordbg and bug whoever owns the code that called SoapUtil.GetResourceString.  Resource name was: \""+key+"\"");
			return s;
		}

Usage Example

Beispiel #1
0
        public object Deserialize(Stream serializationStream, HeaderHandler handler)
        {
            if (serializationStream == null)
            {
                throw new ArgumentNullException("serializationStream");
            }
            if (serializationStream.CanSeek && (serializationStream.Length == 0L))
            {
                throw new SerializationException(SoapUtil.GetResourceString("Serialization_Stream"));
            }
            InternalFE formatterEnums = new InternalFE {
                FEtypeFormat         = this.m_typeFormat,
                FEtopObject          = this.m_topObject,
                FEserializerTypeEnum = InternalSerializerTypeE.Soap,
                FEassemblyFormat     = this.m_assemblyFormat,
                FEsecurityLevel      = this.m_securityLevel
            };
            ObjectReader objectReader = new ObjectReader(serializationStream, this.m_surrogates, this.m_context, formatterEnums, this.m_binder);

            if ((this.soapParser == null) || (serializationStream != this.currentStream))
            {
                this.soapParser    = new SoapParser(serializationStream);
                this.currentStream = serializationStream;
            }
            this.soapParser.Init(objectReader);
            return(objectReader.Deserialize(handler, this.soapParser));
        }
All Usage Examples Of System.Runtime.Serialization.Formatters.Soap.SoapUtil::GetResourceString