コード例 #1
0
        public static TResult FromBase64 <TResult>(this String input)
        {
            Type type = typeof(TResult);

            Object buffer = DDRIT.FromBase64(input, type);

            return((buffer == null) ? default(TResult) : (TResult)buffer);
        }
コード例 #2
0
 public static ImageFactory Optimize(this ImageFactory imageFactory, Stream outStream, Int32 quality = 75)
 {
     return(DDRIT.Optimize(imageFactory, outStream, quality));
 }
コード例 #3
0
 public static ImageFactory WeightedCrop(this ImageFactory imageFactory, Double targetAspectRatio, Point focalPoint)
 {
     return(DDRIT.WeightedCrop(imageFactory, targetAspectRatio, focalPoint));
 }
コード例 #4
0
 public static ImageFactory WeightedCrop(this ImageFactory imageFactory, Size targetSize, Point focalPoint, Boolean forceResize = false)
 {
     return(DDRIT.WeightedCrop(imageFactory, targetSize, focalPoint, forceResize));
 }
コード例 #5
0
 /// <summary>
 /// Converts an input integer to its ordinal suffix
 /// Useful if you need to format the suffix separately of the number itself
 /// </summary>
 /// <param name="input">The integer to convert</param>
 /// <returns>Returns a string of the ordinal suffix</returns>
 public static String ToOrdinalSuffix(this Int32 input)
 {
     return(DDRIT.ToOrdinalSuffix(input));
 }
コード例 #6
0
 public static Byte[] ReadAllBytes(this Stream stream)
 {
     return(DDRIT.ReadAllBytes(stream));
 }
コード例 #7
0
 public static Object FromBase64(this String input, Type type)
 {
     return(DDRIT.FromBase64(input, type));
 }
コード例 #8
0
 public static TResult FromBase64 <TResult>(this String input)
 {
     return(DDRIT.FromBase64 <TResult>(input));
 }
コード例 #9
0
 /// <summary>
 /// Attempts to serialize any object into a Binary Encoded string.
 /// Produces slightly shorter output for types that implement a Parse and ToString method, and objects of type Byte[].
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 public static String ToBase64(this Object input)
 {
     return(DDRIT.ToBase64(input));
 }
コード例 #10
0
 /// <summary>
 /// Attempt to serialize any object into a XML string.
 /// </summary>
 /// <param name="input">The object to serialize.</param>
 /// <returns>A string containing the serialized object.</returns>
 public static String ToXML(this Object input)
 {
     return(DDRIT.ToXML(input));
 }
コード例 #11
0
        /// <summary>
        /// Attempt to deserialize any XML string into an object.
        /// </summary>
        /// <typeparam name="TResult">The type to convert to.</typeparam>
        /// <param name="input">The string to deserialize to an object.</param>
        /// <returns>An Object of type T deserialized from the string.</returns>
        public static TResult FromXML <TResult>(this String input)
        {
            Object buffer = DDRIT.FromXML(input, typeof(TResult));

            return((buffer == null) ? default(TResult) : (TResult)buffer);
        }