Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13370,7 +13370,7 @@ public partial class BlobContainerItem
/// <summary>
/// Creates a new BlobContainerItem instance
/// </summary>
public BlobContainerItem()
internal BlobContainerItem()
: this(false)
{
}
Expand Down Expand Up @@ -14789,7 +14789,7 @@ public partial class BlobItem
/// <summary>
/// Creates a new BlobItem instance
/// </summary>
public BlobItem()
internal BlobItem()
: this(false)
{
}
Expand Down Expand Up @@ -16059,7 +16059,7 @@ public partial class BlobServiceStatistics
/// <summary>
/// Creates a new BlobServiceStatistics instance
/// </summary>
public BlobServiceStatistics()
internal BlobServiceStatistics()
: this(false)
{
}
Expand Down Expand Up @@ -16772,7 +16772,7 @@ public partial class BlockList
/// <summary>
/// Creates a new BlockList instance
/// </summary>
public BlockList()
internal BlockList()
: this(false)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,7 @@ function generateObject(w: IndentWriter, model: IServiceModel, type: IObjectType
}

// Instantiate nested models if necessary
const readonlyModel = Object.values(type.properties).every(p => (<IProperty>p).readonly);
const nested = (<IProperty[]>Object.values(type.properties)).filter(p => !p.isNullable && (isObjectType(p.model) || (isPrimitiveType(p.model) && (p.model.itemType || p.model.type === `dictionary`))));
if (nested.length > 0) {
const skipInitName = `skipInitialization`;
Expand All @@ -886,7 +887,7 @@ function generateObject(w: IndentWriter, model: IServiceModel, type: IObjectType
w.line(`/// </summary>`);
if (type.deserialize) {
// Add an optional overload that prevents initialization for deserialiation
w.write(`public ${naming.type(type.name)}()`);
w.write(`${!type.public || !readonlyModel ? 'public' : 'internal'} ${naming.type(type.name)}()`);
w.scope(() => w.write(`: this(false)`));
w.scope(`{`, `}`, () => null);
w.line();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8180,7 +8180,7 @@ public partial class ShareItem
/// <summary>
/// Creates a new ShareItem instance
/// </summary>
public ShareItem()
internal ShareItem()
: this(false)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3539,7 +3539,7 @@ public partial class QueueItem
/// <summary>
/// Creates a new QueueItem instance
/// </summary>
public QueueItem()
internal QueueItem()
: this(false)
{
}
Expand Down Expand Up @@ -4046,7 +4046,7 @@ public partial class QueueServiceStatistics
/// <summary>
/// Creates a new QueueServiceStatistics instance
/// </summary>
public QueueServiceStatistics()
internal QueueServiceStatistics()
: this(false)
{
}
Expand Down