/// <summary> /// Cria um tipo substituto para o tipo informado. /// </summary> /// <param name="type">Tipo que será criado para substituir.</param> /// <param name="attributeOrder">Hash com os atributos ordenados.</param> /// <returns></returns> public static SerializationSurrogate CreateTypeSurrogate(Type type, Hashtable attributeOrder) { Type type2; if (attributeOrder != null) { _attributeOrder = new Hashtable(); } if ((_attributeOrder != null) && (attributeOrder != null)) { _attributeOrder.Add(type, attributeOrder[type.FullName]); } if (type.IsValueType) { type2 = typeof(DynamicValueTypeSurrogate <>); } else { type2 = typeof(DynamicRefTypeSurrogate <>); } return((SerializationSurrogate)SurrogateHelper.CreateGenericTypeInstance(type2, new Type[] { type })); }