Skip to content

Instantly share code, notes, and snippets.

{
"manifestVersion": 1,
"id": "ID-HERE",
"name": "NAME-HERE",
"version": "0.3.2",
"publisher": "PUBLISHER-HERE",
"public" : false,
"repository": {
"type": "git",
"uri": "https://github.com/jamesmontemagno/vsts-mobile-tasks"
├──images
└──extension-icon.png
├──tasks
├──Task1
└──icon.png
└──package.json
└──task.json
└──task.ts
└──tsconfig.json
├──Task2
public async Task<T> GetAsync<T>(string url, int days = 7, bool forceRefresh = false)
{
var json = string.Empty;
//check if we are connected, else check to see if we have valid data
if (!CrossConnectivity.Current.IsConnected)
json = Barrel.Current.Get(url);
else if (!forceRefresh && !Barrel.Current.IsExpired(url))
json = Barrel.Current.Get(url);
import hellosharedui.droid.UIHelpers;
try {
UIHelpers helpers = new UIHelpers();
Fragment frag = helpers.getMyPageFragment(MainActivity.this);
FragmentManager manager = getSupportFragmentManager();
manager.beginTransaction().replace(R.id.fragment, frag, "main").commit();
}
catch(Throwable ex) {
Log.d("MainActivity", "Unable to replace fragment");
#import "HelloSharedUI.iOS/HelloSharedUI.iOS.h"
- (IBAction)NavigateClicked:(id)sender {
HelloSharedUI_UIHelpers *helpers = [[HelloSharedUI_UIHelpers alloc] init];
[helpers showMyPage];
}
mono '${SolutionDir}/packages/Embeddinator-4000.0.3.0/tools/Embeddinator-4000.exe' '${TargetPath}' --gen=Java --platform=Android --outdir='${SolutionDir}/androidoutput' -c 'bin/Debug/FormsViewGroup.dll'
mono '${SolutionDir}/packages/Embeddinator-4000.0.3.0/tools/objcgen.exe' 'bin/Debug/HelloSharedUI.iOS.dll' --target=framework --platform=iOS --outdir='${SolutionDir}/iosoutput' -c --debug
[Register("hellosharedui.droid.UIHelpers")]
public class UIHelpers : Java.Lang.Object
{
public UIHelpers() : base()
{
}
public UIHelpers(IntPtr handle, JniHandleOwnership transfer)
: base(handle, transfer)
{
public class UIHelpers
{
MyPage view;
public UIHelpers()
{
if(!Forms.IsInitialized)
Forms.Init();
view = new MyPage();
}
public class MyPage : ContentPage
{
public MyPage()
{
var button = new Button
{
Text = "Click Me!",
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.CenterAndExpand,
};