Skip to content

Commit ed16283

Browse files
rethink.
1 parent 5d3af68 commit ed16283

File tree

5 files changed

+36
-12
lines changed

5 files changed

+36
-12
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
}

experiments/Azure.Experiments/Azure.Experiments/ICreateParameters.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.

experiments/Azure.Experiments/Azure.Experiments/ResourceParameters.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ namespace Microsoft.Azure.Experiments
1111
/// </summary>
1212
public abstract class ResourceParameters
1313
{
14-
public static IEnumerable<ResourceParameters> NoDependencies => Enumerable.Empty<ResourceParameters>();
14+
public static IEnumerable<ResourceParameters> NoDependencies
15+
=> Enumerable.Empty<ResourceParameters>();
1516

1617
/// <summary>
1718
/// A resource name.
@@ -64,8 +65,5 @@ public sealed override async Task<DependencyLocation> GetDependencyLocation(
6465
}
6566
return new DependencyLocation(location, HasCommonLocation);
6667
}
67-
68-
//protected abstract Task<T> CreateAsync(
69-
// Context context, ICreateParameters createParameters);
7068
}
7169
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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.

0 commit comments

Comments
 (0)