1
- using System ;
1
+ /* MIT License
2
+
3
+ Copyright (c) 2016 JetBrains http://www.jetbrains.com
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE. */
22
+
23
+ using System ;
2
24
3
25
#pragma warning disable 1591
4
26
// ReSharper disable UnusedMember.Global
@@ -91,11 +113,12 @@ internal sealed class StringFormatMethodAttribute : Attribute
91
113
/// <param name="formatParameterName">
92
114
/// Specifies which parameter of an annotated method should be treated as format-string
93
115
/// </param>
94
- public StringFormatMethodAttribute ( string formatParameterName )
116
+ public StringFormatMethodAttribute ( [ NotNull ] string formatParameterName )
95
117
{
96
118
FormatParameterName = formatParameterName ;
97
119
}
98
120
121
+ [ NotNull ]
99
122
public string FormatParameterName { get ; private set ; }
100
123
}
101
124
@@ -106,7 +129,7 @@ public StringFormatMethodAttribute(string formatParameterName)
106
129
[ AttributeUsage ( AttributeTargets . Parameter | AttributeTargets . Property | AttributeTargets . Field ) ]
107
130
internal sealed class ValueProviderAttribute : Attribute
108
131
{
109
- public ValueProviderAttribute ( string name )
132
+ public ValueProviderAttribute ( [ NotNull ] string name )
110
133
{
111
134
Name = name ;
112
135
}
@@ -171,11 +194,12 @@ internal sealed class InvokerParameterNameAttribute : Attribute { }
171
194
internal sealed class NotifyPropertyChangedInvocatorAttribute : Attribute
172
195
{
173
196
public NotifyPropertyChangedInvocatorAttribute ( ) { }
174
- public NotifyPropertyChangedInvocatorAttribute ( string parameterName )
197
+ public NotifyPropertyChangedInvocatorAttribute ( [ NotNull ] string parameterName )
175
198
{
176
199
ParameterName = parameterName ;
177
200
}
178
201
202
+ [ CanBeNull ]
179
203
public string ParameterName { get ; private set ; }
180
204
}
181
205
@@ -234,6 +258,7 @@ public ContractAnnotationAttribute([NotNull] string contract, bool forceFullStat
234
258
ForceFullStates = forceFullStates ;
235
259
}
236
260
261
+ [ NotNull ]
237
262
public string Contract { get ; private set ; }
238
263
public bool ForceFullStates { get ; private set ; }
239
264
}
@@ -374,7 +399,7 @@ internal enum ImplicitUseKindFlags
374
399
/// </summary>
375
400
InstantiatedWithFixedConstructorSignature = 4 ,
376
401
/// <summary>Indicates implicit instantiation of a type.</summary>
377
- InstantiatedNoFixedConstructorSignature = 8
402
+ InstantiatedNoFixedConstructorSignature = 8 ,
378
403
}
379
404
380
405
/// <summary>
@@ -405,6 +430,7 @@ public PublicAPIAttribute([NotNull] string comment)
405
430
Comment = comment ;
406
431
}
407
432
433
+ [ CanBeNull ]
408
434
public string Comment { get ; private set ; }
409
435
}
410
436
@@ -442,6 +468,7 @@ public MustUseReturnValueAttribute([NotNull] string justification)
442
468
Justification = justification ;
443
469
}
444
470
471
+ [ CanBeNull ]
445
472
public string Justification { get ; private set ; }
446
473
}
447
474
@@ -473,11 +500,12 @@ internal sealed class ProvidesContextAttribute : Attribute { }
473
500
internal sealed class PathReferenceAttribute : Attribute
474
501
{
475
502
public PathReferenceAttribute ( ) { }
476
- public PathReferenceAttribute ( [ PathReference ] string basePath )
503
+ public PathReferenceAttribute ( [ NotNull , PathReference ] string basePath )
477
504
{
478
505
BasePath = basePath ;
479
506
}
480
507
508
+ [ CanBeNull ]
481
509
public string BasePath { get ; private set ; }
482
510
}
483
511
@@ -564,33 +592,36 @@ internal sealed class MacroAttribute : Attribute
564
592
[ AttributeUsage ( AttributeTargets . Assembly , AllowMultiple = true ) ]
565
593
internal sealed class AspMvcAreaMasterLocationFormatAttribute : Attribute
566
594
{
567
- public AspMvcAreaMasterLocationFormatAttribute ( string format )
595
+ public AspMvcAreaMasterLocationFormatAttribute ( [ NotNull ] string format )
568
596
{
569
597
Format = format ;
570
598
}
571
599
600
+ [ NotNull ]
572
601
public string Format { get ; private set ; }
573
602
}
574
603
575
604
[ AttributeUsage ( AttributeTargets . Assembly , AllowMultiple = true ) ]
576
605
internal sealed class AspMvcAreaPartialViewLocationFormatAttribute : Attribute
577
606
{
578
- public AspMvcAreaPartialViewLocationFormatAttribute ( string format )
607
+ public AspMvcAreaPartialViewLocationFormatAttribute ( [ NotNull ] string format )
579
608
{
580
609
Format = format ;
581
610
}
582
611
612
+ [ NotNull ]
583
613
public string Format { get ; private set ; }
584
614
}
585
615
586
616
[ AttributeUsage ( AttributeTargets . Assembly , AllowMultiple = true ) ]
587
617
internal sealed class AspMvcAreaViewLocationFormatAttribute : Attribute
588
618
{
589
- public AspMvcAreaViewLocationFormatAttribute ( string format )
619
+ public AspMvcAreaViewLocationFormatAttribute ( [ NotNull ] string format )
590
620
{
591
621
Format = format ;
592
622
}
593
623
624
+ [ NotNull ]
594
625
public string Format { get ; private set ; }
595
626
}
596
627
@@ -608,22 +639,24 @@ public AspMvcMasterLocationFormatAttribute(string format)
608
639
[ AttributeUsage ( AttributeTargets . Assembly , AllowMultiple = true ) ]
609
640
internal sealed class AspMvcPartialViewLocationFormatAttribute : Attribute
610
641
{
611
- public AspMvcPartialViewLocationFormatAttribute ( string format )
642
+ public AspMvcPartialViewLocationFormatAttribute ( [ NotNull ] string format )
612
643
{
613
644
Format = format ;
614
645
}
615
646
647
+ [ NotNull ]
616
648
public string Format { get ; private set ; }
617
649
}
618
650
619
651
[ AttributeUsage ( AttributeTargets . Assembly , AllowMultiple = true ) ]
620
652
internal sealed class AspMvcViewLocationFormatAttribute : Attribute
621
653
{
622
- public AspMvcViewLocationFormatAttribute ( string format )
654
+ public AspMvcViewLocationFormatAttribute ( [ NotNull ] string format )
623
655
{
624
656
Format = format ;
625
657
}
626
658
659
+ [ NotNull ]
627
660
public string Format { get ; private set ; }
628
661
}
629
662
@@ -637,11 +670,12 @@ public AspMvcViewLocationFormatAttribute(string format)
637
670
internal sealed class AspMvcActionAttribute : Attribute
638
671
{
639
672
public AspMvcActionAttribute ( ) { }
640
- public AspMvcActionAttribute ( string anonymousProperty )
673
+ public AspMvcActionAttribute ( [ NotNull ] string anonymousProperty )
641
674
{
642
675
AnonymousProperty = anonymousProperty ;
643
676
}
644
677
678
+ [ CanBeNull ]
645
679
public string AnonymousProperty { get ; private set ; }
646
680
}
647
681
@@ -654,11 +688,12 @@ public AspMvcActionAttribute(string anonymousProperty)
654
688
internal sealed class AspMvcAreaAttribute : Attribute
655
689
{
656
690
public AspMvcAreaAttribute ( ) { }
657
- public AspMvcAreaAttribute ( string anonymousProperty )
691
+ public AspMvcAreaAttribute ( [ NotNull ] string anonymousProperty )
658
692
{
659
693
AnonymousProperty = anonymousProperty ;
660
694
}
661
695
696
+ [ CanBeNull ]
662
697
public string AnonymousProperty { get ; private set ; }
663
698
}
664
699
@@ -672,11 +707,12 @@ public AspMvcAreaAttribute(string anonymousProperty)
672
707
internal sealed class AspMvcControllerAttribute : Attribute
673
708
{
674
709
public AspMvcControllerAttribute ( ) { }
675
- public AspMvcControllerAttribute ( string anonymousProperty )
710
+ public AspMvcControllerAttribute ( [ NotNull ] string anonymousProperty )
676
711
{
677
712
AnonymousProperty = anonymousProperty ;
678
713
}
679
714
715
+ [ CanBeNull ]
680
716
public string AnonymousProperty { get ; private set ; }
681
717
}
682
718
@@ -774,11 +810,12 @@ internal sealed class AspMvcActionSelectorAttribute : Attribute { }
774
810
internal sealed class HtmlElementAttributesAttribute : Attribute
775
811
{
776
812
public HtmlElementAttributesAttribute ( ) { }
777
- public HtmlElementAttributesAttribute ( string name )
813
+ public HtmlElementAttributesAttribute ( [ NotNull ] string name )
778
814
{
779
815
Name = name ;
780
816
}
781
817
818
+ [ CanBeNull ]
782
819
public string Name { get ; private set ; }
783
820
}
784
821
@@ -867,7 +904,7 @@ internal enum AssertionConditionType
867
904
/// <summary>Marked parameter should be evaluated to null value.</summary>
868
905
IS_NULL = 2 ,
869
906
/// <summary>Marked parameter should be evaluated to not null value.</summary>
870
- IS_NOT_NULL = 3
907
+ IS_NOT_NULL = 3 ,
871
908
}
872
909
873
910
/// <summary>
@@ -920,13 +957,15 @@ internal sealed class XamlItemBindingOfItemsControlAttribute : Attribute { }
920
957
[ AttributeUsage ( AttributeTargets . Class , AllowMultiple = true ) ]
921
958
internal sealed class AspChildControlTypeAttribute : Attribute
922
959
{
923
- public AspChildControlTypeAttribute ( string tagName , Type controlType )
960
+ public AspChildControlTypeAttribute ( [ NotNull ] string tagName , [ NotNull ] Type controlType )
924
961
{
925
962
TagName = tagName ;
926
963
ControlType = controlType ;
927
964
}
928
965
966
+ [ NotNull ]
929
967
public string TagName { get ; private set ; }
968
+ [ NotNull ]
930
969
public Type ControlType { get ; private set ; }
931
970
}
932
971
@@ -947,6 +986,7 @@ public AspRequiredAttributeAttribute([NotNull] string attribute)
947
986
Attribute = attribute ;
948
987
}
949
988
989
+ [ NotNull ]
950
990
public string Attribute { get ; private set ; }
951
991
}
952
992
@@ -964,35 +1004,39 @@ public AspTypePropertyAttribute(bool createConstructorReferences)
964
1004
[ AttributeUsage ( AttributeTargets . Assembly , AllowMultiple = true ) ]
965
1005
internal sealed class RazorImportNamespaceAttribute : Attribute
966
1006
{
967
- public RazorImportNamespaceAttribute ( string name )
1007
+ public RazorImportNamespaceAttribute ( [ NotNull ] string name )
968
1008
{
969
1009
Name = name ;
970
1010
}
971
1011
1012
+ [ NotNull ]
972
1013
public string Name { get ; private set ; }
973
1014
}
974
1015
975
1016
[ AttributeUsage ( AttributeTargets . Assembly , AllowMultiple = true ) ]
976
1017
internal sealed class RazorInjectionAttribute : Attribute
977
1018
{
978
- public RazorInjectionAttribute ( string type , string fieldName )
1019
+ public RazorInjectionAttribute ( [ NotNull ] string type , [ NotNull ] string fieldName )
979
1020
{
980
1021
Type = type ;
981
1022
FieldName = fieldName ;
982
1023
}
983
1024
1025
+ [ NotNull ]
984
1026
public string Type { get ; private set ; }
1027
+ [ NotNull ]
985
1028
public string FieldName { get ; private set ; }
986
1029
}
987
1030
988
1031
[ AttributeUsage ( AttributeTargets . Assembly , AllowMultiple = true ) ]
989
1032
internal sealed class RazorDirectiveAttribute : Attribute
990
1033
{
991
- public RazorDirectiveAttribute ( string directive )
1034
+ public RazorDirectiveAttribute ( [ NotNull ] string directive )
992
1035
{
993
1036
Directive = directive ;
994
1037
}
995
1038
1039
+ [ NotNull ]
996
1040
public string Directive { get ; private set ; }
997
1041
}
998
1042
0 commit comments