---
title: "Base interface and classes for creating value providers"
slug: "base-interface-and-classes-for-creating-value-providers"
abstract: "Learn more about the IFieldValueProvider interfaces and methods."
---
# Base interface and classes for creating value providers

When you create a value provider, you must create a class that inherits the `IFieldValueProvider` interface. This interface contains the `GetValue` method that you must implement in your new class.

- Interface or method: Description
- Interface for providing field values:

```csharp
public interface IFieldValueProvider
{FieldValueProviderContext ValueProviderContext { get; set; }

object GetValue(string parameters);
 }

```

- Context for executing value providers:

```csharp
public class FieldValueProviderContext
{
 public Database Database { get; set; }
 public Item FieldItem { get; set; }
 }

```

- Method in the `IValueField` interface for field value initialization:

```csharp
public interface IValueField
 {
 …
 void InitializeValue(FieldValueProviderContext context);
 }

```

- Virtual method in `InputViewModel<TValueType>` which is overridden in derived classes and casts the value supplied by the provider to the specified `TValueType`:

```csharp
public class InputViewModel<TValueType>
 {
 …
 protected virtual void InitializeValue(object value)
 {
 if (value != null)
 {
 Value = (TValueType)value;
 }
 }
 }

```