diff --git a/src/Microsoft.Graph.Core/Exceptions/Error.cs b/src/Microsoft.Graph.Core/Exceptions/Error.cs
index e39133cb2..e32ce3180 100644
--- a/src/Microsoft.Graph.Core/Exceptions/Error.cs
+++ b/src/Microsoft.Graph.Core/Exceptions/Error.cs
@@ -61,17 +61,16 @@ public class Error: IParsable, IAdditionalDataHolder
///
/// Gets the field deserializers for the class
///
- /// The type of the class
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"code", (o,n) => { (o as Error).Code = n.GetStringValue(); } },
- {"message", (o,n) => {(o as Error).Message = n.GetStringValue(); }},
- {"target", (o,n) => {(o as Error).Target = n.GetStringValue(); }},
- {"details", (o,n) => {(o as Error).Details = n.GetCollectionOfObjectValues(ErrorDetail.CreateFromDiscriminatorValue).ToList(); }},
- {"innerError", (o,n) => {(o as Error).InnerError = n.GetObjectValue(Error.CreateFromDiscriminatorValue); }}
+ {"code", (n) => { Code = n.GetStringValue(); } },
+ {"message", (n) => {Message = n.GetStringValue(); }},
+ {"target", (n) => {Target = n.GetStringValue(); }},
+ {"details", (n) => {Details = n.GetCollectionOfObjectValues(ErrorDetail.CreateFromDiscriminatorValue).ToList(); }},
+ {"innerError", (n) => {InnerError = n.GetObjectValue(Error.CreateFromDiscriminatorValue); }}
};
}
diff --git a/src/Microsoft.Graph.Core/Exceptions/ErrorDetail.cs b/src/Microsoft.Graph.Core/Exceptions/ErrorDetail.cs
index 6d6a1d85a..44cbc1483 100644
--- a/src/Microsoft.Graph.Core/Exceptions/ErrorDetail.cs
+++ b/src/Microsoft.Graph.Core/Exceptions/ErrorDetail.cs
@@ -39,15 +39,14 @@ public class ErrorDetail : IParsable, IAdditionalDataHolder
///
/// Gets the field deserializers for the class
///
- /// The type of the class
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"code", (o,n) => { (o as ErrorDetail).Code = n.GetStringValue(); } },
- {"message", (o,n) => {(o as ErrorDetail).Message = n.GetStringValue(); }},
- {"target", (o,n) => {(o as ErrorDetail).Target = n.GetStringValue(); }}
+ {"code", (n) => { Code = n.GetStringValue(); } },
+ {"message", (n) => {Message = n.GetStringValue(); }},
+ {"target", (n) => {Target = n.GetStringValue(); }}
};
}
diff --git a/src/Microsoft.Graph.Core/Exceptions/ErrorResponse.cs b/src/Microsoft.Graph.Core/Exceptions/ErrorResponse.cs
index 95eebfccd..3425d6d8a 100644
--- a/src/Microsoft.Graph.Core/Exceptions/ErrorResponse.cs
+++ b/src/Microsoft.Graph.Core/Exceptions/ErrorResponse.cs
@@ -26,13 +26,12 @@ public class ErrorResponse :IParsable, IAdditionalDataHolder
///
/// Gets the field deserializers for the class
///
- /// The type of the class
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"error", (o,n) => { (o as ErrorResponse).Error = n.GetObjectValue(Error.CreateFromDiscriminatorValue); } }
+ {"error", (n) => { Error = n.GetObjectValue(Error.CreateFromDiscriminatorValue); } }
};
}
diff --git a/src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj b/src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj
index d1402dbc0..d861a7221 100644
--- a/src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj
+++ b/src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj
@@ -22,10 +22,9 @@
35MSSharedLib1024.snk
true
3.0.0
- preview.2
+ preview.3
- - Added support for vendor specific content types
- - Added support for 204 no content responses
+ - [Breaking] Simplifies GetFieldDeserializers from IParsable
true
true
@@ -100,11 +99,11 @@
-
+
-
+
-
+
diff --git a/src/Microsoft.Graph.Core/Models/AsyncOperationStatus.cs b/src/Microsoft.Graph.Core/Models/AsyncOperationStatus.cs
index 9fb5ed1b7..d8da01772 100644
--- a/src/Microsoft.Graph.Core/Models/AsyncOperationStatus.cs
+++ b/src/Microsoft.Graph.Core/Models/AsyncOperationStatus.cs
@@ -36,15 +36,14 @@ public partial class AsyncOperationStatus: IParsable, IAdditionalDataHolder
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"operation", (o,n) => { (o as AsyncOperationStatus).Operation = n.GetStringValue(); } },
- {"percentageComplete", (o,n) => { (o as AsyncOperationStatus).PercentageComplete = n.GetDoubleValue(); } },
- {"status", (o,n) => { (o as AsyncOperationStatus).Status = n.GetStringValue(); } },
+ {"operation", (n) => { Operation = n.GetStringValue(); } },
+ {"percentageComplete", (n) => { PercentageComplete = n.GetDoubleValue(); } },
+ {"status", (n) => { Status = n.GetStringValue(); } },
};
}
diff --git a/src/Microsoft.Graph.Core/Models/UploadSession.cs b/src/Microsoft.Graph.Core/Models/UploadSession.cs
index 61ffbdc53..42c4ea02b 100644
--- a/src/Microsoft.Graph.Core/Models/UploadSession.cs
+++ b/src/Microsoft.Graph.Core/Models/UploadSession.cs
@@ -37,13 +37,13 @@ internal class UploadSession : IUploadSession
///
/// The deserialization information for the current model
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"expirationDateTime", (o,n) => { (o as UploadSession).ExpirationDateTime = n.GetDateTimeOffsetValue(); } },
- {"nextExpectedRanges", (o,n) => { (o as UploadSession).NextExpectedRanges = n.GetCollectionOfPrimitiveValues().ToList(); } },
- {"uploadUrl", (o,n) => { (o as UploadSession).UploadUrl = n.GetStringValue(); } },
+ {"expirationDateTime", (n) => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } },
+ {"nextExpectedRanges", (n) => { NextExpectedRanges = n.GetCollectionOfPrimitiveValues().ToList(); } },
+ {"uploadUrl", (n) => { UploadUrl = n.GetStringValue(); } },
};
}
diff --git a/src/Microsoft.Graph.Core/Tasks/LargeFileUploadTask.cs b/src/Microsoft.Graph.Core/Tasks/LargeFileUploadTask.cs
index 16bd815ec..258bb693e 100644
--- a/src/Microsoft.Graph.Core/Tasks/LargeFileUploadTask.cs
+++ b/src/Microsoft.Graph.Core/Tasks/LargeFileUploadTask.cs
@@ -60,11 +60,11 @@ public LargeFileUploadTask(IParsable uploadSession, Stream uploadStream, int ma
///
private IUploadSession ExtractSessionFromParsable(IParsable uploadSession)
{
- if (!uploadSession.GetFieldDeserializers().ContainsKey("expirationDateTime"))
+ if (!uploadSession.GetFieldDeserializers().ContainsKey("expirationDateTime"))
throw new ArgumentException("The Parsable does not contain the 'expirationDateTime' property");
- if (!uploadSession.GetFieldDeserializers().ContainsKey("nextExpectedRanges"))
+ if (!uploadSession.GetFieldDeserializers().ContainsKey("nextExpectedRanges"))
throw new ArgumentException("The Parsable does not contain the 'nextExpectedRanges' property");
- if (!uploadSession.GetFieldDeserializers().ContainsKey("uploadUrl"))
+ if (!uploadSession.GetFieldDeserializers().ContainsKey("uploadUrl"))
throw new ArgumentException("The Parsable does not contain the 'uploadUrl' property");
var uploadSessionType = uploadSession.GetType();
diff --git a/src/Microsoft.Graph.Core/Tasks/PageIterator.cs b/src/Microsoft.Graph.Core/Tasks/PageIterator.cs
index 12df1b762..248884928 100644
--- a/src/Microsoft.Graph.Core/Tasks/PageIterator.cs
+++ b/src/Microsoft.Graph.Core/Tasks/PageIterator.cs
@@ -61,7 +61,7 @@ public static PageIterator CreatePageIterator(IBaseCli
if (callback == null)
throw new ArgumentNullException(nameof(callback));
- if (!page.GetFieldDeserializers().ContainsKey("value"))
+ if (!page.GetFieldDeserializers().ContainsKey("value"))
throw new ArgumentException("The Parsable does not contain a collection property");
var pageItems = ExtractEntityListFromParsable(page);
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/AbstractEntityType.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/AbstractEntityType.cs
index 683031253..24f205909 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/AbstractEntityType.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/AbstractEntityType.cs
@@ -26,13 +26,12 @@ public class AbstractEntityType: IParsable, IAdditionalDataHolder
///
/// Gets the field deserializers for the class
///
- /// The type to use
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"id", (o,n) => { (o as AbstractEntityType).Id = n.GetStringValue(); } }
+ {"id", (n) => { Id = n.GetStringValue(); } }
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/DateTestClass.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/DateTestClass.cs
index f646d00ad..d9318bb54 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/DateTestClass.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/DateTestClass.cs
@@ -43,15 +43,14 @@ public class DateTestClass: IParsable
///
/// Gets the field deserializers for the class
///
- /// The type to use
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"nullableDate", (o,n) => { (o as DateTestClass).NullableDate = n.GetDateValue(); } },
- {"dateCollection", (o,n) => { (o as DateTestClass).DateCollection = n.GetCollectionOfPrimitiveValues(); } },
- {"invalidType", (o,n) => { (o as DateTestClass).InvalidType = n.GetIntValue(); } },
+ {"nullableDate", (n) => { NullableDate = n.GetDateValue(); } },
+ {"dateCollection", (n) => { DateCollection = n.GetCollectionOfPrimitiveValues(); } },
+ {"invalidType", (n) => { InvalidType = n.GetIntValue(); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/DerivedTypeClass.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/DerivedTypeClass.cs
index 2ef2cd90f..a02d5fac8 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/DerivedTypeClass.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/DerivedTypeClass.cs
@@ -36,16 +36,15 @@ public class DerivedTypeClass : AbstractEntityType, IParsable, IAdditionalDataHo
///
/// Gets the field deserializers for the class
///
- /// The type to use
///
- public new IDictionary> GetFieldDeserializers()
+ public new IDictionary> GetFieldDeserializers()
{
- return new Dictionary>(base.GetFieldDeserializers())
+ return new Dictionary>(base.GetFieldDeserializers())
{
- {"enumType", (o,n) => { (o as DerivedTypeClass).EnumType = n.GetEnumValue(); } },
- {"name", (o,n) => { (o as DerivedTypeClass).Name = n.GetStringValue(); } },
- {"memorableDates", (o,n) => { (o as DerivedTypeClass).MemorableDates = n.GetCollectionOfObjectValues(DateTestClass.CreateFromDiscriminatorValue); } },
- {"link", (o,n) => { (o as DerivedTypeClass).WebUrl = n.GetStringValue(); } },
+ {"enumType", (n) => { EnumType = n.GetEnumValue(); } },
+ {"name", (n) => { Name = n.GetStringValue(); } },
+ {"memorableDates", (n) => { MemorableDates = n.GetCollectionOfObjectValues(DateTestClass.CreateFromDiscriminatorValue); } },
+ {"link", (n) => { WebUrl = n.GetStringValue(); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestAttendee.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestAttendee.cs
index 1f1fad708..39d9115ae 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestAttendee.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestAttendee.cs
@@ -21,11 +21,10 @@ public TestAttendee()
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public new IDictionary> GetFieldDeserializers()
+ public new IDictionary> GetFieldDeserializers()
{
- return new Dictionary>(base.GetFieldDeserializers())
+ return new Dictionary>(base.GetFieldDeserializers())
{
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestChangeNotificationEncryptedContent.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestChangeNotificationEncryptedContent.cs
index fed6de4d4..30b849e12 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestChangeNotificationEncryptedContent.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestChangeNotificationEncryptedContent.cs
@@ -53,17 +53,16 @@ public class TestChangeNotificationEncryptedContent : IDecryptableContent, IPars
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"data", (o,n) => { (o as TestChangeNotificationEncryptedContent).Data = n.GetStringValue(); } },
- {"dataKey", (o,n) => { (o as TestChangeNotificationEncryptedContent).DataKey = n.GetStringValue(); } },
- {"dataSignature", (o,n) => { (o as TestChangeNotificationEncryptedContent).DataSignature = n.GetStringValue(); } },
- {"encryptionCertificateId", (o,n) => { (o as TestChangeNotificationEncryptedContent).EncryptionCertificateId = n.GetStringValue(); } },
- {"encryptionCertificateThumbprint", (o,n) => { (o as TestChangeNotificationEncryptedContent).EncryptionCertificateThumbprint = n.GetStringValue(); } },
+ {"data", (n) => { Data = n.GetStringValue(); } },
+ {"dataKey", (n) => { DataKey = n.GetStringValue(); } },
+ {"dataSignature", (n) => { DataSignature = n.GetStringValue(); } },
+ {"encryptionCertificateId", (n) => { EncryptionCertificateId = n.GetStringValue(); } },
+ {"encryptionCertificateThumbprint", (n) => { EncryptionCertificateThumbprint = n.GetStringValue(); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestChatMessage.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestChatMessage.cs
index 112f79941..1f8c6dd60 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestChatMessage.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestChatMessage.cs
@@ -48,17 +48,16 @@ public class TestChatMessage: IParsable, IAdditionalDataHolder
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"chatId", (o,n) => { (o as TestChatMessage).ChatId = n.GetStringValue(); } },
- {"createdDateTime", (o,n) => { (o as TestChatMessage).CreatedDateTime = n.GetDateTimeOffsetValue(); } },
- {"deletedDateTime", (o,n) => { (o as TestChatMessage).DeletedDateTime = n.GetDateTimeOffsetValue(); } },
- {"etag", (o,n) => { (o as TestChatMessage).Etag = n.GetStringValue(); } },
- {"body", (o,n) => { (o as TestChatMessage).Body = n.GetObjectValue(TestItemBody.CreateFromDiscriminatorValue); } },
+ {"chatId", (n) => { ChatId = n.GetStringValue(); } },
+ {"createdDateTime", (n) => { CreatedDateTime = n.GetDateTimeOffsetValue(); } },
+ {"deletedDateTime", (n) => { DeletedDateTime = n.GetDateTimeOffsetValue(); } },
+ {"etag", (n) => { Etag = n.GetStringValue(); } },
+ {"body", (n) => { Body = n.GetObjectValue(TestItemBody.CreateFromDiscriminatorValue); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestDateTimeTimeZone.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestDateTimeTimeZone.cs
index 176e044b6..43230e431 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestDateTimeTimeZone.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestDateTimeTimeZone.cs
@@ -46,15 +46,14 @@ public TestDateTimeTimeZone()
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"dateTime", (o,n) => { (o as TestDateTimeTimeZone).DateTime = n.GetStringValue(); } },
- {"timeZone", (o,n) => { (o as TestDateTimeTimeZone).TimeZone = n.GetStringValue(); } },
- {"@odata.type", (o,n) => { (o as TestDateTimeTimeZone).ODataType = n.GetStringValue(); } },
+ {"dateTime", (n) => { DateTime = n.GetStringValue(); } },
+ {"timeZone", (n) => { TimeZone = n.GetStringValue(); } },
+ {"@odata.type", (n) => { ODataType = n.GetStringValue(); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestDrive.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestDrive.cs
index dd6a7b6e1..4d16b6300 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestDrive.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestDrive.cs
@@ -43,15 +43,14 @@ public TestDrive()
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"@odata.type", (o,n) => { (o as TestDrive).ODataType = n.GetStringValue(); } },
- {"id", (o,n) => { (o as TestDrive).Id = n.GetStringValue(); } },
- {"name", (o,n) => { (o as TestDrive).Name = n.GetStringValue(); } },
+ {"@odata.type", (n) => { ODataType = n.GetStringValue(); } },
+ {"id", (n) => { Id = n.GetStringValue(); } },
+ {"name", (n) => { Name = n.GetStringValue(); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestDriveItem.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestDriveItem.cs
index af8de04ff..d5117c77a 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestDriveItem.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestDriveItem.cs
@@ -54,16 +54,15 @@ public TestDriveItem()
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"id", (o,n) => { (o as TestDriveItem).Id = n.GetStringValue(); } },
- {"@odata.type", (o,n) => { (o as TestDriveItem).ODataType = n.GetStringValue(); } },
- {"name", (o,n) => { (o as TestDriveItem).Name = n.GetStringValue(); } },
- {"size", (o,n) => { (o as TestDriveItem).Size = n.GetLongValue(); } }
+ {"id", (n) => { Id = n.GetStringValue(); } },
+ {"@odata.type", (n) => { ODataType = n.GetStringValue(); } },
+ {"name", (n) => { Name = n.GetStringValue(); } },
+ {"size", (n) => { Size = n.GetLongValue(); } }
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEmailAddress.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEmailAddress.cs
index e7686c174..2e40bfb39 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEmailAddress.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEmailAddress.cs
@@ -46,15 +46,14 @@ public TestEmailAddress()
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"@odata.type", (o,n) => { (o as TestEmailAddress).ODataType = n.GetStringValue(); } },
- {"address", (o,n) => { (o as TestEmailAddress).Address = n.GetStringValue(); } },
- {"name", (o,n) => { (o as TestEmailAddress).Name = n.GetStringValue(); } },
+ {"@odata.type", (n) => { ODataType = n.GetStringValue(); } },
+ {"address", (n) => { Address = n.GetStringValue(); } },
+ {"name", (n) => { Name = n.GetStringValue(); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEvent.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEvent.cs
index 9a9337d91..5c71c0c7e 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEvent.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEvent.cs
@@ -72,19 +72,18 @@ public TestEvent()
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"@odata.type", (o,n) => { (o as TestEvent).ODataType = n.GetStringValue(); } },
- {"id", (o,n) => { (o as TestEvent).Id = n.GetStringValue(); } },
- {"subject", (o,n) => { (o as TestEvent).Subject = n.GetStringValue(); } },
- {"body", (o,n) => { (o as TestEvent).Body = n.GetObjectValue(TestItemBody.CreateFromDiscriminatorValue); } },
- {"end", (o,n) => { (o as TestEvent).End = n.GetObjectValue(TestDateTimeTimeZone.CreateFromDiscriminatorValue); } },
- {"start", (o,n) => { (o as TestEvent).Start = n.GetObjectValue(TestDateTimeTimeZone.CreateFromDiscriminatorValue); } },
- {"attendees", (o,n) => { (o as TestEvent).Attendees = n.GetCollectionOfObjectValues(TestAttendee.CreateFromDiscriminatorValue); } },
+ {"@odata.type", (n) => { ODataType = n.GetStringValue(); } },
+ {"id", (n) => { Id = n.GetStringValue(); } },
+ {"subject", (n) => { Subject = n.GetStringValue(); } },
+ {"body", (n) => { Body = n.GetObjectValue(TestItemBody.CreateFromDiscriminatorValue); } },
+ {"end", (n) => { End = n.GetObjectValue(TestDateTimeTimeZone.CreateFromDiscriminatorValue); } },
+ {"start", (n) => { Start = n.GetObjectValue(TestDateTimeTimeZone.CreateFromDiscriminatorValue); } },
+ {"attendees", (n) => { Attendees = n.GetCollectionOfObjectValues(TestAttendee.CreateFromDiscriminatorValue); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEventDeltaCollectionResponse.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEventDeltaCollectionResponse.cs
index 650c0aef2..30849afa7 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEventDeltaCollectionResponse.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEventDeltaCollectionResponse.cs
@@ -32,14 +32,13 @@ public class TestEventDeltaCollectionResponse: IParsable, IAdditionalDataHolder
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"@odata.nextLink", (o,n) => { (o as TestEventDeltaCollectionResponse).NextLink = n.GetStringValue(); } },
- {"value", (o,n) => { (o as TestEventDeltaCollectionResponse).Value = n.GetCollectionOfObjectValues(TestEvent.CreateFromDiscriminatorValue).ToList(); } },
+ {"@odata.nextLink", (n) => { NextLink = n.GetStringValue(); } },
+ {"value", (n) => { Value = n.GetCollectionOfObjectValues(TestEvent.CreateFromDiscriminatorValue).ToList(); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEventItem.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEventItem.cs
index 54e3165a2..0851cf4e2 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEventItem.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEventItem.cs
@@ -43,31 +43,31 @@ public class TestEventItem : IParsable, IAdditionalDataHolder
///
/// The deserialization information for the current model
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>() {
- {"allowNewTimeProposals", (o,n) => { (o as TestEventItem).AllowNewTimeProposals = n.GetBoolValue(); } },
- {"bodyPreview", (o,n) => { (o as TestEventItem).BodyPreview = n.GetStringValue(); } },
- {"hasAttachments", (o,n) => { (o as TestEventItem).HasAttachments = n.GetBoolValue(); } },
- {"hideAttendees", (o,n) => { (o as TestEventItem).HideAttendees = n.GetBoolValue(); } },
- {"iCalUId", (o,n) => { (o as TestEventItem).ICalUId = n.GetStringValue(); } },
- {"instances", (o,n) => { (o as TestEventItem).Instances = n.GetCollectionOfObjectValues(TestEventItem.CreateFromDiscriminatorValue).ToList(); } },
- {"isAllDay", (o,n) => { (o as TestEventItem).IsAllDay = n.GetBoolValue(); } },
- {"isCancelled", (o,n) => { (o as TestEventItem).IsCancelled = n.GetBoolValue(); } },
- {"isDraft", (o,n) => { (o as TestEventItem).IsDraft = n.GetBoolValue(); } },
- {"isOnlineMeeting", (o,n) => { (o as TestEventItem).IsOnlineMeeting = n.GetBoolValue(); } },
- {"isOrganizer", (o,n) => { (o as TestEventItem).IsOrganizer = n.GetBoolValue(); } },
- {"isReminderOn", (o,n) => { (o as TestEventItem).IsReminderOn = n.GetBoolValue(); } },
- {"onlineMeetingUrl", (o,n) => { (o as TestEventItem).OnlineMeetingUrl = n.GetStringValue(); } },
- {"originalEndTimeZone", (o,n) => { (o as TestEventItem).OriginalEndTimeZone = n.GetStringValue(); } },
- {"originalStart", (o,n) => { (o as TestEventItem).OriginalStart = n.GetDateTimeOffsetValue(); } },
- {"originalStartTimeZone", (o,n) => { (o as TestEventItem).OriginalStartTimeZone = n.GetStringValue(); } },
- {"reminderMinutesBeforeStart", (o,n) => { (o as TestEventItem).ReminderMinutesBeforeStart = n.GetIntValue(); } },
- {"responseRequested", (o,n) => { (o as TestEventItem).ResponseRequested = n.GetBoolValue(); } },
- {"seriesMasterId", (o,n) => { (o as TestEventItem).SeriesMasterId = n.GetStringValue(); } },
- {"subject", (o,n) => { (o as TestEventItem).Subject = n.GetStringValue(); } },
- {"transactionId", (o,n) => { (o as TestEventItem).TransactionId = n.GetStringValue(); } },
- {"webLink", (o,n) => { (o as TestEventItem).WebLink = n.GetStringValue(); } },
+ return new Dictionary>() {
+ {"allowNewTimeProposals", (n) => { AllowNewTimeProposals = n.GetBoolValue(); } },
+ {"bodyPreview", (n) => { BodyPreview = n.GetStringValue(); } },
+ {"hasAttachments", (n) => { HasAttachments = n.GetBoolValue(); } },
+ {"hideAttendees", (n) => { HideAttendees = n.GetBoolValue(); } },
+ {"iCalUId", (n) => { ICalUId = n.GetStringValue(); } },
+ {"instances", (n) => { Instances = n.GetCollectionOfObjectValues(TestEventItem.CreateFromDiscriminatorValue).ToList(); } },
+ {"isAllDay", (n) => { IsAllDay = n.GetBoolValue(); } },
+ {"isCancelled", (n) => { IsCancelled = n.GetBoolValue(); } },
+ {"isDraft", (n) => { IsDraft = n.GetBoolValue(); } },
+ {"isOnlineMeeting", (n) => { IsOnlineMeeting = n.GetBoolValue(); } },
+ {"isOrganizer", (n) => { IsOrganizer = n.GetBoolValue(); } },
+ {"isReminderOn", (n) => { IsReminderOn = n.GetBoolValue(); } },
+ {"onlineMeetingUrl", (n) => { OnlineMeetingUrl = n.GetStringValue(); } },
+ {"originalEndTimeZone", (n) => { OriginalEndTimeZone = n.GetStringValue(); } },
+ {"originalStart", (n) => { OriginalStart = n.GetDateTimeOffsetValue(); } },
+ {"originalStartTimeZone", (n) => { OriginalStartTimeZone = n.GetStringValue(); } },
+ {"reminderMinutesBeforeStart", (n) => { ReminderMinutesBeforeStart = n.GetIntValue(); } },
+ {"responseRequested", (n) => { ResponseRequested = n.GetBoolValue(); } },
+ {"seriesMasterId", (n) => { SeriesMasterId = n.GetStringValue(); } },
+ {"subject", (n) => { Subject = n.GetStringValue(); } },
+ {"transactionId", (n) => { TransactionId = n.GetStringValue(); } },
+ {"webLink", (n) => { WebLink = n.GetStringValue(); } },
};
}
///
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEventsResponse.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEventsResponse.cs
index 56d1e4609..316aed074 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEventsResponse.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestEventsResponse.cs
@@ -24,11 +24,11 @@ public TestEventsResponse()
///
/// The deserialization information for the current model
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary> {
- {"@odata.nextLink", (o,n) => { (o as TestEventsResponse).NextLink = n.GetStringValue(); } },
- {"value", (o,n) => { (o as TestEventsResponse).Value = n.GetCollectionOfObjectValues(TestEventItem.CreateFromDiscriminatorValue).ToList(); } },
+ return new Dictionary> {
+ {"@odata.nextLink", (n) => { NextLink = n.GetStringValue(); } },
+ {"value", (n) => { Value = n.GetCollectionOfObjectValues(TestEventItem.CreateFromDiscriminatorValue).ToList(); } },
};
}
///
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestItemBody.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestItemBody.cs
index 7e1d6d9ec..85a6c4792 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestItemBody.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestItemBody.cs
@@ -46,15 +46,14 @@ public TestItemBody()
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"@odata.type", (o,n) => { (o as TestItemBody).ODataType = n.GetStringValue(); } },
- {"contentType", (o,n) => { (o as TestItemBody).ContentType = n.GetEnumValue(); } },
- {"content", (o,n) => { (o as TestItemBody).Content = n.GetStringValue(); } },
+ {"@odata.type", (n) => { ODataType = n.GetStringValue(); } },
+ {"contentType", (n) => { ContentType = n.GetEnumValue(); } },
+ {"content", (n) => { Content = n.GetStringValue(); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestNotebook.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestNotebook.cs
index f754e2b36..5754dff63 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestNotebook.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestNotebook.cs
@@ -43,15 +43,14 @@ public TestNoteBook()
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"@odata.type", (o,n) => { (o as TestNoteBook).ODataType = n.GetStringValue(); } },
- {"id", (o,n) => { (o as TestNoteBook).Id = n.GetStringValue(); } },
- {"displayName", (o,n) => { (o as TestNoteBook).DisplayName = n.GetStringValue(); } },
+ {"@odata.type", (n) => { ODataType = n.GetStringValue(); } },
+ {"id", (n) => { Id = n.GetStringValue(); } },
+ {"displayName", (n) => { DisplayName = n.GetStringValue(); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestRecipient.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestRecipient.cs
index 422ac5c0a..87e719f59 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestRecipient.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestRecipient.cs
@@ -37,14 +37,13 @@ public TestRecipient()
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"@odata.type", (o,n) => { (o as TestRecipient).ODataType = n.GetStringValue(); } },
- {"emailAddress", (o,n) => { (o as TestRecipient).EmailAddress = n.GetObjectValue(TestEmailAddress.CreateFromDiscriminatorValue); } },
+ {"@odata.type", (n) => { ODataType = n.GetStringValue(); } },
+ {"emailAddress", (n) => { EmailAddress = n.GetObjectValue(TestEmailAddress.CreateFromDiscriminatorValue); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestResourceData.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestResourceData.cs
index 2896fbc01..61b13b2ed 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestResourceData.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestResourceData.cs
@@ -27,13 +27,12 @@ public partial class TestResourceData : IParsable, IAdditionalDataHolder
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"@odata.type", (o,n) => { (o as TestResourceData).ODataType = n.GetStringValue(); } },
+ {"@odata.type", (n) => { ODataType = n.GetStringValue(); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestSubscription.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestSubscription.cs
index 0a4bb5d21..9dab1c58b 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestSubscription.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestSubscription.cs
@@ -24,13 +24,12 @@ public class TestSubscription : IEncryptableSubscription,IParsable, IAdditionalD
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"encryptionCertificate", (o,n) => { (o as TestSubscription).EncryptionCertificate = n.GetStringValue(); } },
+ {"encryptionCertificate", (n) => { EncryptionCertificate = n.GetStringValue(); } },
};
}
diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestUser.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestUser.cs
index abf80db2f..fac51fad4 100644
--- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestUser.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestUser.cs
@@ -72,19 +72,18 @@ public TestUser()
///
/// Gets the field deserializers for the instance
///
- /// The type to deserialize
///
- public IDictionary> GetFieldDeserializers()
+ public IDictionary> GetFieldDeserializers()
{
- return new Dictionary>
+ return new Dictionary>
{
- {"id", (o,n) => { (o as TestUser).Id = n.GetStringValue(); } },
- {"@odata.type", (o,n) => { (o as TestUser).ODataType = n.GetStringValue(); } },
- {"givenName", (o,n) => { (o as TestUser).GivenName = n.GetStringValue(); } },
- {"displayName", (o,n) => { (o as TestUser).DisplayName = n.GetStringValue(); } },
- {"state", (o,n) => { (o as TestUser).State = n.GetStringValue(); } },
- {"surname", (o,n) => { (o as TestUser).Surname = n.GetStringValue(); } },
- {"eventDeltas", (o,n) => { (o as TestUser).EventDeltas = n.GetCollectionOfObjectValues(TestEvent.CreateFromDiscriminatorValue).ToList(); } },
+ {"id", (n) => { Id = n.GetStringValue(); } },
+ {"@odata.type", (n) => { ODataType = n.GetStringValue(); } },
+ {"givenName", (n) => { GivenName = n.GetStringValue(); } },
+ {"displayName", (n) => { DisplayName = n.GetStringValue(); } },
+ {"state", (n) => { State = n.GetStringValue(); } },
+ {"surname", (n) => { Surname = n.GetStringValue(); } },
+ {"eventDeltas", (n) => { EventDeltas = n.GetCollectionOfObjectValues(TestEvent.CreateFromDiscriminatorValue).ToList(); } },
};
}