WebPermission.IsSubsetOf determines whether the current WebPermission is a subset of the specified object. : WebPermission « Network Remote « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net » Network Remote » WebPermissionScreenshots 
WebPermission.IsSubsetOf determines whether the current WebPermission is a subset of the specified object.
 


Imports System.Text.RegularExpressions
Imports System.Net
Module Example
   Public Sub Main()
      Dim targetPermission As New WebPermission()
      targetPermission.AddPermission(NetworkAccess.Connect, New Regex("www\.domain\.com/Public/.*"))

      Dim connectPermission As New WebPermission()
      connectPermission.AddPermission(NetworkAccess.Connect, "www.domain.com/Public/default.htm")

      Console.WriteLine(("Is the second URI a subset of the first one?: " & connectPermission.IsSubsetOf(targetPermission)))

   End Sub
End Module

   
  
Related examples in the same category
1.WebPermission Class
2.Get all the URIs with Accept permission
3.Create WebPermission with the access rights for the specified URI regular expression.
4.Create WebPermission class with the access rights for the specified URI.
5.Create WebPermission that passes all demands or fails all demands.
6.WebPermission.AcceptList Property returns accept permissions
7.Adds URI with the access rights to the current WebPermission.
8.Adds URI string with the specified access rights to the current WebPermission.
9.WebPermission.FromXml creates a WebPermission from an XML encoding.
10.WebPermission.Intersect returns intersection of two WebPermission instances.
11.WebPermission.Union Method returns union between two instances of the WebPermission class.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.