GetFormatter() private method

private GetFormatter ( ) : IStateFormatter
return IStateFormatter
示例#1
0
        internal void RestoreEventValidationState(string fieldValue)
        {
            if (!page.EnableEventValidation || fieldValue == null || fieldValue.Length == 0)
            {
                return;
            }
            IStateFormatter fmt = page.GetFormatter();

            eventValidationValues = (int [])fmt.Deserialize(fieldValue);
            eventValidationPos    = eventValidationValues.Length;
        }
示例#2
0
        internal string GetEventValidationStateFormatted()
        {
            if (eventValidationValues == null || eventValidationValues.Length == 0)
            {
                return(null);
            }

            Page page = OwnerPage;

            if (page.IsCallback && !_hasRegisteredForEventValidationOnCallback)
            {
                return(null);
            }

            IStateFormatter fmt = page.GetFormatter();

            int [] array = new int [eventValidationPos];
            Array.Copy(eventValidationValues, array, eventValidationPos);
            return(fmt.Serialize(array));
        }