Write() public method

public Write ( string>.IDictionary dictionary ) : string
dictionary string>.IDictionary
return string
コード例 #1
0
        protected virtual string Serialize(MvxViewModelRequest toSerialise)
        {
            var stringDictionaryWriter = new MvxStringDictionaryWriter();

            var dictionary = new Dictionary<string, string>();
            dictionary["Type"] = SerializeViewModelName(toSerialise.ViewModelType);
            dictionary["Params"] = stringDictionaryWriter.Write(toSerialise.ParameterValues);
            dictionary["Pres"] = stringDictionaryWriter.Write(toSerialise.PresentationValues);
            return stringDictionaryWriter.Write(dictionary);
        }
コード例 #2
0
        protected virtual string Serialize(MvxViewModelRequest toSerialise)
        {
            var stringDictionaryWriter = new MvxStringDictionaryWriter();

            var dictionary = new Dictionary <string, string>();

            dictionary["Type"] = this.SerializeViewModelName(toSerialise.ViewModelType);
            var requestedBy = toSerialise.RequestedBy ?? new MvxRequestedBy();

            dictionary["By"]     = ((int)requestedBy.Type).ToString();
            dictionary["Info"]   = requestedBy.AdditionalInfo;
            dictionary["Params"] = stringDictionaryWriter.Write(toSerialise.ParameterValues);
            dictionary["Pres"]   = stringDictionaryWriter.Write(toSerialise.PresentationValues);
            return(stringDictionaryWriter.Write(dictionary));
        }
コード例 #3
0
        protected virtual string Serialize(MvxViewModelRequest toSerialise)
        {
            if (toSerialise == null)
            {
                throw new ArgumentNullException(nameof(toSerialise));
            }

            var stringDictionaryWriter = new MvxStringDictionaryWriter();

            var dictionary = new Dictionary <string, string>();

            dictionary["Type"]   = SerializeViewModelName(toSerialise.ViewModelType);
            dictionary["Params"] = stringDictionaryWriter.Write(toSerialise.ParameterValues);
            dictionary["Pres"]   = stringDictionaryWriter.Write(toSerialise.PresentationValues);
            return(stringDictionaryWriter.Write(dictionary));
        }
コード例 #4
0
        protected virtual string Serialize(IDictionary <string, string> toSerialise)
        {
            var stringDictionaryWriter = new MvxStringDictionaryWriter();

            return(stringDictionaryWriter.Write(toSerialise));
        }