Пример #1
0
 internal static CefX509CertPrincipal FromNativeOrNull(cef_x509cert_principal_t *ptr)
 {
     if (ptr == null)
     {
         return(null);
     }
     return(new CefX509CertPrincipal(ptr));
 }
Пример #2
0
 private CefX509CertPrincipal(cef_x509cert_principal_t *ptr)
 {
     if (ptr == null)
     {
         throw new ArgumentNullException("ptr");
     }
     _self = ptr;
 }
Пример #3
0
 public void Dispose()
 {
     if (_self != null)
     {
         Release();
         _self = null;
     }
     GC.SuppressFinalize(this);
 }
        public static void get_domain_components(cef_x509cert_principal_t *self, cef_string_list *components)
        {
            get_domain_components_delegate d;
            var p = self->_get_domain_components;

            if (p == _pb)
            {
                d = _db;
            }
            else
            {
                d = (get_domain_components_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_domain_components_delegate));
                if (_pb == IntPtr.Zero)
                {
                    _db = d; _pb = p;
                }
            }
            d(self, components);
        }
        public static void get_street_addresses(cef_x509cert_principal_t *self, cef_string_list *addresses)
        {
            get_street_addresses_delegate d;
            var p = self->_get_street_addresses;

            if (p == _p8)
            {
                d = _d8;
            }
            else
            {
                d = (get_street_addresses_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_street_addresses_delegate));
                if (_p8 == IntPtr.Zero)
                {
                    _d8 = d; _p8 = p;
                }
            }
            d(self, addresses);
        }
        public static void get_organization_unit_names(cef_x509cert_principal_t *self, cef_string_list *names)
        {
            get_organization_unit_names_delegate d;
            var p = self->_get_organization_unit_names;

            if (p == _pa)
            {
                d = _da;
            }
            else
            {
                d = (get_organization_unit_names_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_organization_unit_names_delegate));
                if (_pa == IntPtr.Zero)
                {
                    _da = d; _pa = p;
                }
            }
            d(self, names);
        }
        public static cef_string_userfree *get_country_name(cef_x509cert_principal_t *self)
        {
            get_country_name_delegate d;
            var p = self->_get_country_name;

            if (p == _p7)
            {
                d = _d7;
            }
            else
            {
                d = (get_country_name_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_country_name_delegate));
                if (_p7 == IntPtr.Zero)
                {
                    _d7 = d; _p7 = p;
                }
            }
            return(d(self));
        }
        public static int has_one_ref(cef_x509cert_principal_t *self)
        {
            has_one_ref_delegate d;
            var p = self->_base._has_one_ref;

            if (p == _p2)
            {
                d = _d2;
            }
            else
            {
                d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate));
                if (_p2 == IntPtr.Zero)
                {
                    _d2 = d; _p2 = p;
                }
            }
            return(d(self));
        }
        public static int release(cef_x509cert_principal_t *self)
        {
            release_delegate d;
            var p = self->_base._release;

            if (p == _p1)
            {
                d = _d1;
            }
            else
            {
                d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate));
                if (_p1 == IntPtr.Zero)
                {
                    _d1 = d; _p1 = p;
                }
            }
            return(d(self));
        }
        public static void add_ref(cef_x509cert_principal_t *self)
        {
            add_ref_delegate d;
            var p = self->_base._add_ref;

            if (p == _p0)
            {
                d = _d0;
            }
            else
            {
                d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate));
                if (_p0 == IntPtr.Zero)
                {
                    _d0 = d; _p0 = p;
                }
            }
            d(self);
        }
Пример #11
0
 internal static CefX509CertPrincipal FromNative(cef_x509cert_principal_t *ptr)
 {
     return(new CefX509CertPrincipal(ptr));
 }
Пример #12
0
 public CefX509CertPrincipal(cef_x509cert_principal_t *instance)
     : base((cef_base_ref_counted_t *)instance)
 {
 }