File tree Expand file tree Collapse file tree 5 files changed +36
-12
lines changed
experiments/Azure.Experiments/Azure.Experiments Expand file tree Collapse file tree 5 files changed +36
-12
lines changed Original file line number Diff line number Diff line change
1
+ using System . Collections . Generic ;
2
+ using System . Threading . Tasks ;
3
+
4
+ namespace Microsoft . Azure . Experiments
5
+ {
6
+ public abstract class CreateInfo
7
+ {
8
+ public abstract IEnumerable < CreateInfo > Dependencies { get ; }
9
+
10
+ public abstract Task CreateAsync ( Context context ) ;
11
+ }
12
+ }
Original file line number Diff line number Diff line change
1
+ namespace Microsoft . Azure . Experiments
2
+ {
3
+ public interface ICreateContext
4
+ {
5
+ Context Context { get ; }
6
+
7
+ string Location { get ; }
8
+
9
+ Info Get < Info > ( ResourceParameters < Info > parameters )
10
+ where Info : class ;
11
+ }
12
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ namespace Microsoft.Azure.Experiments
11
11
/// </summary>
12
12
public abstract class ResourceParameters
13
13
{
14
- public static IEnumerable < ResourceParameters > NoDependencies => Enumerable . Empty < ResourceParameters > ( ) ;
14
+ public static IEnumerable < ResourceParameters > NoDependencies
15
+ => Enumerable . Empty < ResourceParameters > ( ) ;
15
16
16
17
/// <summary>
17
18
/// A resource name.
@@ -64,8 +65,5 @@ public sealed override async Task<DependencyLocation> GetDependencyLocation(
64
65
}
65
66
return new DependencyLocation ( location , HasCommonLocation ) ;
66
67
}
67
-
68
- //protected abstract Task<T> CreateAsync(
69
- // Context context, ICreateParameters createParameters);
70
68
}
71
69
}
Original file line number Diff line number Diff line change
1
+ # Stages
2
+
3
+ 1 . Get a current Azure state. Each resource has a function to get information from Azure.
4
+ The function is an asynchronous operation.
5
+ 2 . Analyze the state. For example, extract a location from the state.
6
+ The analysis is a syncronous operation. On this stage, a user interaction may be required.
7
+ All decisions has to be made on this stage.
8
+ 3 . Create a graph of create/update operations. This operation is synchronous.
9
+ 4 . Execute the graph. This operation is asynchronous and may require a progress bar, AsJob etc.
10
+ It can also create several resources simultaneously.
You can’t perform that action at this time.
0 commit comments