-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate mappings used by
Xamarin.Android.Build.Tasks
.
- Loading branch information
Showing
44 changed files
with
1,615 additions
and
1,134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
build-tools/manifest-attribute-codegen/SourceWriters/AttributeMappingField.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Xamarin.SourceWriter; | ||
|
||
namespace Xamarin.Android.Tools.ManifestAttributeCodeGenerator; | ||
|
||
class AttributeMappingField : FieldWriter | ||
{ | ||
public static AttributeMappingField Create (MetadataType type) | ||
{ | ||
var field = new AttributeMappingField { | ||
Name = "mapping", | ||
IsStatic = true, | ||
Type = new TypeReferenceWriter ($"Xamarin.Android.Manifest.ManifestDocumentElement<{type.ManagedName}>"), | ||
Value = $"new (\"{type.Name}\")", | ||
}; | ||
|
||
return field; | ||
} | ||
} |
Oops, something went wrong.