private bool IsValid(ISourceImage image)
        {
            var content = Converters.StreamToByteArray(image.Content);

            if (validFormats.Any(vf => vf.SequenceEqual(content.Take(vf.Length))))
            {
                return(true);
            }
            return(false);
        }
Beispiel #2
0
        public static ISourceImage bindTo_ISourceImage(IComponentIntrospect component)
        {
            global::System.IntPtr cPtr = solarPINVOKE.bindTo_ISourceImage(IComponentIntrospect.getCPtr(component));
            ISourceImage          ret  = (cPtr == global::System.IntPtr.Zero) ? null : new ISourceImage(cPtr, true);

            if (solarPINVOKE.SWIGPendingException.Pending)
            {
                throw solarPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }