@@ -27,6 +27,8 @@ partial class IntentFilterAttribute {
2727 { "DataPort" , "port" } ,
2828 { "DataScheme" , "scheme" } ,
2929 { "AutoVerify" , "autoVerify" } ,
30+ { "DataPathSuffix" , "pathSuffix" } ,
31+ { "DataPathAdvancedPattern" , "pathAdvancedPattern" } ,
3032 } ;
3133
3234 static readonly Dictionary < string , Action < IntentFilterAttribute , object > > setters = new Dictionary < string , Action < IntentFilterAttribute , object > > ( ) {
@@ -50,6 +52,10 @@ partial class IntentFilterAttribute {
5052 { "DataSchemes" , ( self , value ) => self . DataSchemes = ToStringArray ( value ) } ,
5153 { "AutoVerify" , ( self , value ) => self . _AutoVerify = ( bool ) value } ,
5254 { "RoundIcon" , ( self , value ) => self . _RoundIcon = ( string ) value } ,
55+ { "DataPathSuffix" , ( self , value ) => self . DataPathSuffix = ( string ) value } ,
56+ { "DataPathSuffixes" , ( self , value ) => self . DataPathSuffixes = ToStringArray ( value ) } ,
57+ { "DataPathAdvancedPattern" , ( self , value ) => self . DataPathAdvancedPattern = ( string ) value } ,
58+ { "DataPathAdvancedPatterns" , ( self , value ) => self . DataPathAdvancedPatterns = ToStringArray ( value ) } ,
5359 } ;
5460
5561 static string [ ] ToStringArray ( object value )
@@ -126,6 +132,8 @@ IEnumerable<XElement> GetData (string packageName)
126132 Func < string , XAttribute > toPathPrefix = v => ToAttribute ( "DataPathPrefix" , ReplacePackage ( v , packageName ) ) ;
127133 Func < string , XAttribute > toPort = v => ToAttribute ( "DataPort" , ReplacePackage ( v , packageName ) ) ;
128134 Func < string , XAttribute > toScheme = v => ToAttribute ( "DataScheme" , ReplacePackage ( v , packageName ) ) ;
135+ Func < string , XAttribute > toPathSuffix = v => ToAttribute ( "DataPathSuffix" , ReplacePackage ( v , packageName ) ) ;
136+ Func < string , XAttribute > toPathAdvancedPattern = v => ToAttribute ( "DataPathAdvancedPattern" , ReplacePackage ( v , packageName ) ) ;
129137 Func < Func < string , XAttribute > , string , XElement > toData = ( f , s ) => string . IsNullOrEmpty ( s ) ? null : new XElement ( "data" , f ( s ) ) ;
130138 var empty = Array . Empty < string > ( ) ;
131139 var dataList = Enumerable . Empty < XElement > ( )
@@ -135,11 +143,13 @@ IEnumerable<XElement> GetData (string packageName)
135143 . Concat ( ( DataPathPatterns ?? empty ) . Select ( p => toData ( toPathPattern , p ) ) )
136144 . Concat ( ( DataPathPrefixes ?? empty ) . Select ( p => toData ( toPathPrefix , p ) ) )
137145 . Concat ( ( DataPorts ?? empty ) . Select ( p => toData ( toPort , p ) ) )
138- . Concat ( ( DataSchemes ?? empty ) . Select ( p => toData ( toScheme , p ) ) ) ;
146+ . Concat ( ( DataSchemes ?? empty ) . Select ( p => toData ( toScheme , p ) ) )
147+ . Concat ( ( DataPathSuffixes ?? empty ) . Select ( p => toData ( toPathSuffix , p ) ) )
148+ . Concat ( ( DataPathAdvancedPatterns ?? empty ) . Select ( p => toData ( toPathAdvancedPattern , p ) ) ) ;
139149 if ( string . IsNullOrEmpty ( DataHost ) && string . IsNullOrEmpty ( DataMimeType ) &&
140150 string . IsNullOrEmpty ( DataPath ) && string . IsNullOrEmpty ( DataPathPattern ) && string . IsNullOrEmpty ( DataPathPrefix ) &&
141- string . IsNullOrEmpty ( DataPort ) && string . IsNullOrEmpty ( DataScheme ) &&
142- ! dataList . Any ( ) )
151+ string . IsNullOrEmpty ( DataPort ) && string . IsNullOrEmpty ( DataScheme ) && string . IsNullOrEmpty ( DataPathSuffix ) &&
152+ string . IsNullOrEmpty ( DataPathAdvancedPattern ) && ! dataList . Any ( ) )
143153 return null ;
144154 return new XElement [ ] {
145155 toData ( toHost , DataHost ) ,
@@ -148,7 +158,9 @@ IEnumerable<XElement> GetData (string packageName)
148158 toData ( toPathPattern , DataPathPattern ) ,
149159 toData ( toPathPrefix , DataPathPrefix ) ,
150160 toData ( toPort , DataPort ) ,
151- toData ( toScheme , DataScheme ) }
161+ toData ( toScheme , DataScheme ) ,
162+ toData ( toPathSuffix , DataPathSuffix ) ,
163+ toData ( toPathAdvancedPattern , DataPathAdvancedPattern ) }
152164 . Concat ( dataList ) . Where ( x => x != null ) ;
153165 }
154166 }
0 commit comments